B2024-025 Older Parent/Child procedure sets use applicability tokens that do not include the “U-“ prefix.
This commit is contained in:
@@ -468,10 +468,12 @@ namespace VEPROMS.CSLA.Library
|
||||
return text;
|
||||
}
|
||||
// B2022-035: resolve unit specific designators - moved code to here so that other objects can use it
|
||||
// B2024-025 added <ID> to the replace list
|
||||
public static string ResolveUnitSpecific(DocVersionInfo mydocversion, string text)
|
||||
{
|
||||
if (mydocversion == null) return text;
|
||||
text = Regex.Replace(text, @"\<U\>", mydocversion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<ID\>", mydocversion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)ID)\>", mydocversion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)NAME)\>", mydocversion.DocVersionConfig.Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)TEXT)\>", mydocversion.DocVersionConfig.Unit_Text, RegexOptions.IgnoreCase);
|
||||
|
@@ -2934,7 +2934,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
string str = MyContent.Text;
|
||||
// B2022-035: resolve unit specific designators
|
||||
if (str.ToUpper().Contains(@"<U")) str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(this.MyDocVersion, str);
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(this.MyDocVersion, str);
|
||||
return ConvertToDisplayText(str, false, " "); // B2024-013 added " " to replace hard returns with a space instead of semi-colon
|
||||
}
|
||||
}
|
||||
@@ -2946,7 +2947,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
string str = MyContent.Text;
|
||||
// B2022-035: resolve unit specific designators
|
||||
if (str.ToUpper().Contains(@"<U")) str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(this.MyDocVersion, str);
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(this.MyDocVersion, str);
|
||||
return ConvertToDisplayText(str, false, ""); // pass in empty string for hard retun char will keep hard return
|
||||
}
|
||||
}
|
||||
@@ -2960,7 +2962,8 @@ namespace VEPROMS.CSLA.Library
|
||||
string str = MyContent.Text;
|
||||
if (MyDocVersion != null)
|
||||
{
|
||||
str = Regex.Replace(str, @"\<[uU]\>", MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(MyDocVersion, str);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2979,16 +2982,13 @@ namespace VEPROMS.CSLA.Library
|
||||
if (MyDocVersion != null)
|
||||
{
|
||||
// B2022-035: resolve unit specific designators
|
||||
if (str.ToUpper().Contains("<U")) str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(MyDocVersion, str);
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(MyDocVersion, str);
|
||||
}
|
||||
else
|
||||
{
|
||||
_MyLog.WarnFormat("Disconnected Data - ItemID = {0}", ItemID);
|
||||
}
|
||||
//if (str.Contains("<u>"))
|
||||
// str = str.Replace("<u>", MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
//if (str.Contains("<U>"))
|
||||
// str = str.Replace("<U>", MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
return ConvertToDisplayText(str);
|
||||
}
|
||||
}
|
||||
@@ -3047,7 +3047,8 @@ namespace VEPROMS.CSLA.Library
|
||||
string str = MyContent.Text;
|
||||
if (MyDocVersion != null)
|
||||
{
|
||||
str = Regex.Replace(str, @"\<[uU]\>", MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(MyDocVersion, str);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3080,8 +3081,8 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
else
|
||||
str = MyContent.Number;
|
||||
str = Regex.Replace(str, @"\<U-ID\>", MyDocVersion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
||||
str = Regex.Replace(str, @"\<ID\>", MyDocVersion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(MyDocVersion, str);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3094,7 +3095,9 @@ namespace VEPROMS.CSLA.Library
|
||||
// str = str.Replace(@"<S\u8209?ID>", MyDocVersion.DocVersionConfig.Unit_ID);
|
||||
str = ConvertToDisplayText(str);
|
||||
if (MyDocVersion != null) // B2020-086 check for null doc version - happens if item we are trying to open is no longer there (disconnected)
|
||||
str = Regex.Replace(str, @"\<[uU]\>", MyDocVersion.DocVersionConfig.Unit_Number); // B2017-019 - process "<u>" in section number
|
||||
// B2017-019 - process "<u>" in section number
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(MyDocVersion, str);
|
||||
return str;
|
||||
}
|
||||
//get { return ConvertToDisplayText(MyContent.Number); }
|
||||
|
@@ -1540,8 +1540,8 @@ namespace VEPROMS.CSLA.Library
|
||||
ItemInfo tmpitm = TranGetSectionItem(itminfo);
|
||||
if (!tmpitm.IsSection) return "";
|
||||
string str = tmpitm.MyContent.Number;
|
||||
str = Regex.Replace(str, @"\<U\>", itminfo.MyDocVersion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase );
|
||||
str = Regex.Replace(str, @"\<ID\>", itminfo.MyDocVersion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(itminfo.MyDocVersion, str);
|
||||
return (str);
|
||||
}
|
||||
private static string TranGetSectionNumber(TransitionBuilder tb, bool allLevels)
|
||||
@@ -1566,8 +1566,8 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
//string str = tmpitm.MyContent.Number;
|
||||
string str = BuildSectionPath(ToSections);
|
||||
str = Regex.Replace(str, @"\<U\>", tb._ToItem.MyDocVersion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase);
|
||||
str = Regex.Replace(str, @"\<ID\>", tb._ToItem.MyDocVersion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
||||
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
|
||||
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(tb._ToItem.MyDocVersion, str);
|
||||
//if (!str.EndsWith(".") && tb._ToItem.ItemID != tb._ToItem.ActiveSection.ItemID)
|
||||
tb.StepPrefix = ".";
|
||||
tb.SectionNumberLength = str.Length;
|
||||
|
Reference in New Issue
Block a user