C2021-064 Process the new pagelist token (EOPNUMROLU) and remove any Parent/Child unit tokens that were added to the EOP number.
This commit is contained in:
parent
93967ad209
commit
7175ea8fd4
@ -1818,6 +1818,8 @@ i = 0;
|
|||||||
case "[EOPNUM]":
|
case "[EOPNUM]":
|
||||||
case "{PREDELIMEOPNUM}":
|
case "{PREDELIMEOPNUM}":
|
||||||
case "[PREDELIMEOPNUM]":
|
case "[PREDELIMEOPNUM]":
|
||||||
|
case "{EOPNUMROLU}":
|
||||||
|
case "[EOPNUMROLU]":
|
||||||
string eopnum = section.MyProcedure.MyContent.Number;
|
string eopnum = section.MyProcedure.MyContent.Number;
|
||||||
string unitnum = MySection.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber;
|
string unitnum = MySection.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber;
|
||||||
string unitname = MySection.MyDocVersion.DocVersionConfig.Unit_Name;
|
string unitname = MySection.MyDocVersion.DocVersionConfig.Unit_Name;
|
||||||
@ -1829,10 +1831,32 @@ i = 0;
|
|||||||
eopnum = unitnum.Replace("!", unitname);
|
eopnum = unitnum.Replace("!", unitname);
|
||||||
if (eopnum == string.Empty)
|
if (eopnum == string.Empty)
|
||||||
eopnum = section.MyProcedure.MyContent.Number;
|
eopnum = section.MyProcedure.MyContent.Number;
|
||||||
// B2021-066: found and fixed during proc pc/pc work
|
|
||||||
if (eopnum.ToUpper().Contains(@"<U")) eopnum = section.MyProcedure.DisplayNumber;
|
if (eopnum.ToUpper().Contains(@"<U"))
|
||||||
|
{
|
||||||
|
// C2021-064 If we are processing the EOP number or an ROLookUp in the pagelist, then strip out the Parent/Child unit tokens
|
||||||
|
// so that we are left with just the EOP number. This is used along with Parent/Child RO Values (in RO Editor)
|
||||||
|
if ((token.Equals("{EOPNUMROLU}") || token.Equals("[EOPNUMROLU]")))
|
||||||
|
{
|
||||||
|
// copied Rgex from DisplayText and modifed to remove the Parent/Child Unit information
|
||||||
|
// i.e. <U>, <U-ID>, <U-NAME>, <U-TEXT>, <U-NUMBER>, <U-OTHER ID>, <U-OTHER NAME>, <U-OTHER TEXT>, <U-OTHER NUMBER>
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<U\>", "", RegexOptions.IgnoreCase);
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)ID)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NAME)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)TEXT)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NUMBER)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHER ID)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHER NAME)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHER TEXT)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||||
|
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHER NUMBER)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eopnum = section.MyProcedure.DisplayNumber;// B2021-066: found and fixed during proc pc/pc work
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (token.Equals("{PREDELIMEOPNUM}"))
|
if (token.Equals("{ PREDELIMEOPNUM}"))
|
||||||
{
|
{
|
||||||
// only use up to the first non-alphanumeric character of the procedur number
|
// only use up to the first non-alphanumeric character of the procedur number
|
||||||
// Prairie Island (NSP) Alarms use this token
|
// Prairie Island (NSP) Alarms use this token
|
||||||
|
Loading…
x
Reference in New Issue
Block a user