B2024-078 Bad Transition preventing editing of a substep. Can enter changed text, but then when move to another textbox, original text returns.

This commit is contained in:
Matthew Schill 2024-10-10 08:38:35 -04:00
parent 63a60b32cc
commit a550ef1b50

View File

@ -1165,7 +1165,10 @@ namespace VEPROMS.CSLA.Library
{
int sp = odte.Link.IndexOf(" ") + 1; // get past tran type
string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp);
recid = System.Convert.ToInt32(srecid);
//CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
if (int.TryParse(srecid, out recid))
{
foreach (ContentTransition ct in itm.MyContent.ContentTransitions)
{
if (ct.TransitionID == recid)
@ -1175,6 +1178,7 @@ namespace VEPROMS.CSLA.Library
}
}
}
}
else
{
int sp = odte.Link.IndexOf(" ");
@ -1656,7 +1660,15 @@ namespace VEPROMS.CSLA.Library
private string FixTransition(string link, string text)
{
if (link.IndexOf("<NewID>") != -1) return text;
int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
//CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
int transitionID;
string[] splt_link = link.Split(' ');
if (splt_link.Length < 2 || !int.TryParse(splt_link[1], out transitionID))
{
return text;
}
// Find the transition
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
{