diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs index 43698151..55083f2d 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs @@ -920,7 +920,20 @@ namespace VEPROMS.CSLA.Library tb.Append("\\" + token.Substring(0, token.Length - 1) + "\\}"); startIndex = rexEndToken + 1; prevToken = token; - if (startIndex >= tb._TransFormat.Length) break; + if (startIndex >= tb._TransFormat.Length) + { + // F2023-029 the prefix contains the ending quotes followed by the prefix text for a step number + // we need to strip off the prefix for the step number and append the text before it + if (prefix != null) + { + if (prefix.EndsWith(", Step\xA0")) + prefix = prefix.Remove(prefix.LastIndexOf(", Step\xA0")); + prefix = prefix.Trim(); + if (prefix.Length > 0) + tb.Append(prefix); + } + break; // jump put of the foreach loop + } } if ((startIndex < tb._TransFormat.Length) && lastAdded) tb.Append(tb._TransFormat.Substring(startIndex, tb._TransFormat.Length - startIndex)); string myReturn = Regex.Replace(tb.ToString(), @"\.+", "."); @@ -1431,7 +1444,7 @@ namespace VEPROMS.CSLA.Library } private static bool AddTranGetSectionNumber(TransitionBuilder tb, bool allLevels) { - if (tb._TranType == 1 && tb._ToItem.ActiveSection.ItemID == tb._FromItem.ActiveSection.ItemID) return false; + if (tb._TranType == 1 && tb._ToItem.ActiveSection.ItemID == tb._FromItem.ActiveSection.ItemID) return false; if (tb.SectNumWithStepNum) return false; if (tb._TranType == 0 && (tb._ToItem.IsSection || tb._ToItem.IsProcedure) && ((tb._TransUI & E_TransUI.StepAllowNone) == E_TransUI.StepAllowNone)) { @@ -1439,7 +1452,7 @@ namespace VEPROMS.CSLA.Library if (tmpStr.ToUpper().EndsWith(", STEP ")) tb.Remove(tb.Length - 7, 7); // 7 is length of ", Step " else if (tb.Prefix != null && tb.Prefix.StartsWith(")")) tb.Append(")"); - return true; + return true; } if (tb.SectionsUsed.Contains(tb._ToItem.ItemID)) return false;