From 5ad9d81cc1cbb35d0df4f87d20ec12f0d4d78972 Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 14 Feb 2025 15:10:40 -0500 Subject: [PATCH 1/7] =?UTF-8?q?C2024-038=20PROMS=20=E2=80=93=20Summary=20o?= =?UTF-8?q?f=20Changes=20report=20generation=20enhancements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an upgrade item to add a method to exclude annotations and a way run the summary of changes report from a specific date. --- .../Extension/AuditExt.cs | 34 +++++++ .../Volian.Controls.Library/DisplayHistory.cs | 87 +++++++++++++++--- .../DisplayHistory.designer.cs | Bin 33744 -> 47962 bytes .../Volian.Controls.Library.csproj | 3 + .../PDFChronologyReport.cs | 4 +- 5 files changed, 115 insertions(+), 13 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/AuditExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/AuditExt.cs index 856f91f7..287d8e12 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/AuditExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/AuditExt.cs @@ -194,6 +194,23 @@ namespace VEPROMS.CSLA.Library public partial class AnnotationAuditInfoList { + + /// + /// C2024- 038 - Summary of Changes report generation enhancements + /// Constructor - takes a Generic list of AnnotationAuditInfo + /// and creates a AnnotationAuditInfoList + /// + public AnnotationAuditInfoList(List lst) + { + IsReadOnly = false; + if (lst != null) + { + foreach (AnnotationAuditInfo itm in lst) + this.Add(itm); + } + IsReadOnly = true; + } + /// /// Return a list of all AnnotationAuditInfo by ItemID. /// @@ -487,6 +504,23 @@ namespace VEPROMS.CSLA.Library public partial class ContentAuditInfoList { + + /// + /// C2024- 038 - Summary of Changes report generation enhancements + /// Constructor - takes a Generic list of ContentAuditInfo + /// and creates a ContentAuditInfoList + /// + public ContentAuditInfoList(List lst) + { + IsReadOnly = false; + if (lst != null) + { + foreach (ContentAuditInfo itm in lst) + this.Add(itm); + } + IsReadOnly = true; + } + /// /// Return a list of all ContentAuditInfo by ContentID. /// diff --git a/PROMS/Volian.Controls.Library/DisplayHistory.cs b/PROMS/Volian.Controls.Library/DisplayHistory.cs index 8e647378..a66c6952 100644 --- a/PROMS/Volian.Controls.Library/DisplayHistory.cs +++ b/PROMS/Volian.Controls.Library/DisplayHistory.cs @@ -10,6 +10,7 @@ using System.IO; using System.Text.RegularExpressions; using JR.Utils.GUI.Forms; using Volian.Base.Library; +using System.Linq; namespace Volian.Controls.Library { @@ -163,7 +164,7 @@ namespace Volian.Controls.Library else { DateTime revDate; - if (!DateTime.TryParse(cfg.Print_RevDate, out revDate)) revDate = MyProcedureInfo.ChangeBarDate; // DateTime.Now; + if (!DateTime.TryParse(cfg.Print_RevDate, out revDate)) revDate = MyProcedureInfo.ChangeBarDate; // DateTime.Now; SetRevDate(revDate); //SetRevDate(DateTime.Parse(cfg.Print_RevDate)); } @@ -263,7 +264,7 @@ namespace Volian.Controls.Library { AnnotationTypeInfo ati = AnnotationTypeInfo.Get(aai.TypeID); // B2023-066: Crash when trying to access a deleted annotation type (added the ati==null check) - tn = annotationDeleted.Nodes.Add(ati==null?"Deleted Annotation Type":ati.Name); + tn = annotationDeleted.Nodes.Add(ati == null ? "Deleted Annotation Type" : ati.Name); } TreeNode cn = tn.Nodes.Add(aai.ListString()); cn.Tag = aai; @@ -517,7 +518,7 @@ namespace Volian.Controls.Library if (delC.Type >= 0 && delC.Type < 1000) { int indx = delC.Config.IndexOf("DelProcReason"); - if (indx >= 0 && delC.Config.Length > indx+15) // 15 accounts for 'DelProcReason = "' + if (indx >= 0 && delC.Config.Length > indx + 15) // 15 accounts for 'DelProcReason = "' { string reason = delC.Config.Substring(indx + 15); if (reason != null && reason.Length > 0) @@ -529,7 +530,7 @@ namespace Volian.Controls.Library } } } - TreeNode tnn = deletedItems.Nodes.Add(iai.ToString()+"; Reason: " + strR); + TreeNode tnn = deletedItems.Nodes.Add(iai.ToString() + "; Reason: " + strR); tnn.Tag = iai; #endregion } @@ -558,7 +559,7 @@ namespace Volian.Controls.Library if (MyProcedureInfo == null) { this.ParentForm.Cursor = Cursors.Default; - btnViewSummaryReport.Enabled = btnViewChronologyReport.Enabled = lbChanges.Items.Count > 0; + btnViewSummaryReport.Enabled = btnViewChronologyReport.Enabled = cbSumExcludeAnn.Enabled = DT_SumAsOf.Enabled = lbChanges.Items.Count > 0; return; } ContentAuditInfoList cail2; @@ -586,7 +587,7 @@ namespace Volian.Controls.Library // B2020-156: When procedure title is changed, it does not print in Summary/Chronolgy of changes. // Need to only check the date (not the date/time) for some procedures, the original item was listed // in the list box and should not be because some MyRevDate's did not have time included. - if (CompareDateOrDateTime(cai.DTS,MyRevDate) || cai.ActionWhen > MyRevDate) + if (CompareDateOrDateTime(cai.DTS, MyRevDate) || cai.ActionWhen > MyRevDate) { string itemTitle = FixPath(cai.Path); lbChanges.Items.Add(cai); @@ -614,7 +615,7 @@ namespace Volian.Controls.Library } //Console.WriteLine("WalkProcedure fini: {0} seconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalSeconds); this.ParentForm.Cursor = Cursors.Default; - btnViewSummaryReport.Enabled = btnViewChronologyReport.Enabled = lbChanges.Items.Count > 0; + btnViewSummaryReport.Enabled = btnViewChronologyReport.Enabled = cbSumExcludeAnn.Enabled = DT_SumAsOf.Enabled = lbChanges.Items.Count > 0; RefreshRequired = false; return; } @@ -648,9 +649,73 @@ namespace Volian.Controls.Library //_AnnotationList = AnnotationAuditInfoList.GetChronology(0, 0, MyProcedureInfo.ChangeBarDate); //added setting selected slave in order for reports to replace unit number,etc jcb 20101010 MyItemInfo.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = ApplDisplayMode; - // OnSummaryPrintRequest(new DisplayHistoryReportEventArgs(Volian.Base.Library.VlnSettings.TemporaryFolder + @"\MySummary.pdf", MyItemInfo.MyProcedure, _SummaryAuditList, _AnnotationList)); - OnSummaryPrintRequest(new DisplayHistoryReportEventArgs(string.Format(@"{0}\{1} Summary of Changes.pdf", Volian.Base.Library.VlnSettings.TemporaryFolder, MyItemInfo.MyProcedure.PDFNumber), MyItemInfo.MyProcedure, _SummaryAuditList, _AnnotationList)); - //} + + var dhr = new DisplayHistoryReportEventArgs(string.Format(@"{0}\{1} Summary of Changes.pdf", Volian.Base.Library.VlnSettings.TemporaryFolder, MyItemInfo.MyProcedure.PDFNumber), MyItemInfo.MyProcedure, null, null); + + //C2024- 038 - Summary of Changes report generation enhancements + //check if need to modify + // _SummaryAuditList + if (DT_SumAsOf.Checked) + dhr.AuditList = FilterSummaryByDate(_SummaryAuditList, DT_SumAsOf.Value); + else + dhr.AuditList = _SummaryAuditList; + + //C2024- 038 - Summary of Changes report generation enhancements + // if Exclude Annotations Checked + // send an empty list instead of + //_AnnotationList + if (cbSumExcludeAnn.Checked) + dhr.AnnotationList = new AnnotationAuditInfoList(null); + else if (DT_SumAsOf.Checked) + dhr.AnnotationList = FilterSummaryByDate_Annotations(_AnnotationList, DT_SumAsOf.Value); + else + { dhr.AnnotationList = _AnnotationList; } + + OnSummaryPrintRequest(dhr); + } + + //C2024- 038 - Summary of Changes report generation enhancements + //modify _SummaryAuditList + //to limit to a specific date + private ContentAuditInfoList FilterSummaryByDate(ContentAuditInfoList summaryAuditList, DateTime value) + { + List slst = summaryAuditList.Clone().ToList(); + + //Grab the first change to each item before the date and set that to the AsOf date + foreach (ContentAuditInfo firstbeforedate in slst.GroupBy(x => x.ItemID).Select(x => x.OrderByDescending(y => y.DTS).FirstOrDefault(d => d.DTS < value))) + { + if (firstbeforedate != null && firstbeforedate.ActionWhat != "Deleted") + { + firstbeforedate.ActionWhat = $"As Of: {value.ToShortDateString()}"; + } + } + //remove all items before the date we are checking against + //note that for deleted - sometimes the DTS is not correct and + //need to use the ActionWhen + slst.RemoveAll(x => x.DTS < value && !x.ActionWhat.StartsWith("As Of:") && (x.ActionWhat != "Deleted" || (x.ActionWhen < x.DTS ? x.DTS : x.ActionWhen) < value)); + + //remove all items where first text matches the last text + //unless it was added after the date we are checking against + //or the last item is a deletion that occurred after + //the date we are checking against + var itms = slst.Select(x => x.ItemID).Distinct().ToList(); + foreach (int itmID in itms) + { + ContentAuditInfo first = slst.Where(i => i.ItemID == itmID).OrderBy(y => y.DTS).FirstOrDefault(); + ContentAuditInfo last = slst.Where(i => i.ItemID == itmID).OrderByDescending(y => y.DTS).FirstOrDefault(); + if (first != null && last != null && first.DTS < value && (last.ActionWhat != "Deleted" || (last.ActionWhen < last.DTS ? last.DTS : last.ActionWhen) < value) && ItemInfo.ConvertToDisplayText(first.Text) == ItemInfo.ConvertToDisplayText(last.Text)) + slst.RemoveAll(x => x.ItemID == itmID); + } + + return new ContentAuditInfoList(slst); + } + + //C2024- 038 - Summary of Changes report generation enhancements + //modify _SummaryAuditList + //to limit to a specific date + private AnnotationAuditInfoList FilterSummaryByDate_Annotations(AnnotationAuditInfoList annotationAuditList, DateTime value) + { + return new AnnotationAuditInfoList(annotationAuditList.Where(x => x.DTS >= value).ToList()); } private void btnRefresh_Click(object sender, EventArgs e) { @@ -1060,7 +1125,7 @@ namespace Volian.Controls.Library set { _AuditList = value; } } private AnnotationAuditInfoList _AnnotationList; - public AnnotationAuditInfoList AnnotationList + public AnnotationAuditInfoList AnnotationList { get { return _AnnotationList; } set { _AnnotationList = value; } diff --git a/PROMS/Volian.Controls.Library/DisplayHistory.designer.cs b/PROMS/Volian.Controls.Library/DisplayHistory.designer.cs index 87fcb3cef4237d7ca3471a59b28b94458be79767..2936956c4dcbf0d21f6e969610d0ed757eb701dc 100644 GIT binary patch literal 47962 zcmeHQTW=k=5nlAoMGLe*ANz2sRE3N>swLZToHzj#UlO5lY*>nuH^Y*SWW}c|(R z&0lZ(eH_i(zw~d z6FX);`^_Hk9^U}}M6P%VSjtylGz)+zD}RI$Wvqqf zOT$sGFy07%+r?L|G2hxVIK;7?G|vtG2Y@NKbG0pWV*fe*a|Gzm0q3N7WBxmCuHdh` zfPMfRxc*#ki|?0He&Aa3?J+3CuN>zHYfo6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bzC{Vy&3I=L^r{(Cu)gIWV_A2? zw=@cxL zaii@g@zy8&^OOjP`Z${UMwsc;HJ+RxXle;#$TOB0_`xa7oy+NiTs^miTgR=R>*Thb zrdHi;dT48pfGzDi1x7jcvOPc|e`78K$?5k+6zAz(f(ZpopT^|qZc{*XM*-Cyb|~R| zM~r})nLf62f$;e32Mkm0siJ7ggONq-l|pf_un2JOd=eC&j|JKJNh=f-Z$51=ehv4&N7e4WM9Azb5)hV0 z_b(^HsmoaK-M_qEu%?GqS6m_qEU!fFxf&!QlCpLC)pw~Of}UQ*TsKqF_GivnD@n}y zIqo*Iu@DX~R#EF_<1QGHsbIv2_lDWnDrl)pwlf=3VRZ@~zR{GuOsnmwxG@u{7>=W+ zP4HmPE56m(sL6zRaMZLMbo;7lcOHfKDgjEsP=<6&Qx@<)DuPi{4pR--Et}{Nc8dl6 zvWOK?C7EJH)Nq!TnLk0hvoJ{wXB~{p;Id}D8gjF-Wa`d75NY9ZX6eMn#vDwpjXB>? z4+(#KnH63v%NB`=y!@piO0U(z)a||2EQs5Bmf9uS*#f+m2^uKQhv{4yqdzNL&7fbl z;qja4yB!Y)K`w0!G%Un8A;{pzF*-b>Zxy;iHaTJHs0;eFw)^!}N-bnlOS z#d_NYul2UIbGx|;=%`oIwVCSQ0b8!=MCLMlP3-j;K7bE_@PT-c4N75r05d}Opb1{+ zqoH9igpSfZh$m2TJ$Kd%)n2p~R;Nkf=5>t4Z?Cu0e$E@6^lRoNcN42jQqe#A4A+jY xol$c;a^T63PfG@?fJiY=FoN1-Yz+jBVo5`?n$U9W$I<3_VZq$7nQh?z{|nL*giinf diff --git a/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj b/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj index e615e5de..1510659d 100644 --- a/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj +++ b/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj @@ -443,6 +443,9 @@ DisplayBookMarks.cs Designer + + DisplayHistory.cs + DisplayLibDocs.cs Designer diff --git a/PROMS/Volian.Print.Library/PDFChronologyReport.cs b/PROMS/Volian.Print.Library/PDFChronologyReport.cs index b0111d5c..73e7ca1e 100644 --- a/PROMS/Volian.Print.Library/PDFChronologyReport.cs +++ b/PROMS/Volian.Print.Library/PDFChronologyReport.cs @@ -1090,7 +1090,7 @@ namespace Volian.Print.Library firstCAI = null; lastCAI = null; } - else if (firstCAI.ActionWhat == lastCAI.ActionWhat) + else if (firstCAI.ActionWhat == lastCAI.ActionWhat || firstCAI.ActionWhat.StartsWith("As Of:")) { auditList1.Add(firstCAI); auditList1.Add(lastCAI); @@ -1153,7 +1153,7 @@ namespace Volian.Print.Library firstCAI = null; lastCAI = null; } - else if (firstCAI.ActionWhat == lastCAI.ActionWhat) + else if (firstCAI.ActionWhat == lastCAI.ActionWhat || firstCAI.ActionWhat.StartsWith("As Of:")) { auditList1.Add(firstCAI); auditList1.Add(lastCAI); -- 2.47.2 From 3a739c5b649e6454c4de1ef94e1704d8d0c28bd8 Mon Sep 17 00:00:00 2001 From: mschill Date: Mon, 17 Feb 2025 08:21:16 -0500 Subject: [PATCH 2/7] =?UTF-8?q?B2025-016=20=E2=80=93=20Quick=20Print=20Sho?= =?UTF-8?q?rtcut=20Key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found during Functional Testing: Using "ALT R" shortcut key shows that Quick Print PDF & Create PDF both then have "P" as their shortcut. Kept Create PDF/Print as Ctrl-P. Changed Quick Print to be shortcut of Ctrl-Q. --- .../StepTabRibbon.designer.cs | Bin 575428 -> 575428 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs index 4e00b55fda78b6e034d4554abf38a3f3c8a4c856..33fc65fe5b524d2adb6f050cb1c1792c6312116d 100644 GIT binary patch delta 223 zcmX@ouY9CmxnT?A99zb~=?k?PwWk|cGs;c3`pPIaT|t16XYv9bndx%ZfIdM+`l0!1YtmT^5{JODI#;bg_>7alMI?X+i{GyT9NMmDg<15X*7 ikgRzE)(5hs9cT*>GXXI(5VHU=D-g47PkGLs@BjdmdQz_d delta 185 zcmX@ouY9CmxnT?A9NXy&E-@-hPq1Rtnr`)#QEa+`03*-j1w1m-<*qTxLB#bgGj@Pk z+vV&T-596;y2AJcB4hENQDAz?b4Du&H{cp$#I#31L$qEnnrxrp#3;8AWV{+sOafv$ z*AvDA(>-*6HXgXd$hQ5%6UHF0dB4C)K*qHLjRRsPAZ7+)79eH?Vz%um&)E|m0022K BNrwOc -- 2.47.2 From 3ee9e0f4eb4d95ce232a6d23e007c5654b427c97 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Mon, 17 Feb 2025 15:12:06 -0500 Subject: [PATCH 3/7] F2025-002 Per customer, remove the newly added Action Verbs from the PROMS ReplaceWords list. --- PROMS/Formats/fmtall/FNPCASall.xml | Bin 63754 -> 63870 bytes PROMS/Formats/fmtall/FNPDEVall.xml | Bin 100188 -> 100304 bytes PROMS/Formats/fmtall/FNPEBKall.xml | Bin 86612 -> 86728 bytes PROMS/Formats/fmtall/FNPSAM1all.xml | Bin 135918 -> 136034 bytes PROMS/Formats/fmtall/FNP_00all.xml | Bin 78258 -> 78374 bytes PROMS/Formats/fmtall/FNP_01all.xml | Bin 75624 -> 75740 bytes PROMS/Formats/fmtall/FNPall.xml | Bin 168436 -> 168552 bytes PROMS/Formats/fmtall/fnpnmpall.xml | Bin 104690 -> 104806 bytes 8 files changed, 0 insertions(+), 0 deletions(-) diff --git a/PROMS/Formats/fmtall/FNPCASall.xml b/PROMS/Formats/fmtall/FNPCASall.xml index af8aa1dbc448dbc63bfd04d36e77b0040bd28e10..8afc0ba9c3880e40a391ba335376b6b897de6029 100644 GIT binary patch delta 103 zcmeDB#Qg6Q^9C_NXGI2GAXH!|Vn}7kWyohJ1JWr#egTj!0@BG0r3}RkB|w>6sE84R rK7%2HIgm7BFaToH$$~uFH*XVsv}3Y>APY0lxXFwH!kcHDD$)Z0$0--^ delta 19 bcmezOiMi_&^9C`&%>{x@J2&&3F46-4U`q(& diff --git a/PROMS/Formats/fmtall/FNPDEVall.xml b/PROMS/Formats/fmtall/FNPDEVall.xml index e77486392533d29f82ee3d3269d61d30cd9c4288..5ce54f995323ed8e1b2420b5e5ad6629fe8e7238 100644 GIT binary patch delta 99 zcmcc9$9AEgZ9{^jvm%2o5GpVfF{Co&GUPLq0qGPVzW_)V0qJChQifuN5}-^jRK$ou npTUs997q~57yz;9PQXvgNLD|vMQimwaT diff --git a/PROMS/Formats/fmtall/FNPSAM1all.xml b/PROMS/Formats/fmtall/FNPSAM1all.xml index 0e1b5101e007fad7bf750ad939eee417ff561f40..4198c0db9681ddfa2864ae314f32ab7367f75f7e 100644 GIT binary patch delta 100 zcmaF2l;hDdjtv>w&Wa4WK&Ze_#E{C6%aG4d2BcGf`~o0d1f-K0N*Rh7N`NxCP!S^r peFj4Yb0BHNU;xCXn*+6H?wp*U!ZN*R0;5Fpnjtv>wlP~Bk*qo&EXh(D0)9rCj8CmoI#{>;- diff --git a/PROMS/Formats/fmtall/FNP_00all.xml b/PROMS/Formats/fmtall/FNP_00all.xml index ec44611874ae8eff656a61b02d2893cab19658de..3ae14422d757bbde9333841a2fa28a739743a32b 100644 GIT binary patch delta 103 zcmdn=m}S`$mJKc9&Wa4WK&Ze_#E{C6%aG4d2BcGf`~o0d1f-K0N*Rh7N`NxCP!S^r reFj4Yb0BHNU;xCXlPBtK->f3>XvgFReimk+ag!T`g*UTZT$2C*<5C#` delta 23 fcmZ4Xgk{rXmJKc9lRqdd*jy*^XvgNNi)#`9lobr4 diff --git a/PROMS/Formats/fmtall/FNP_01all.xml b/PROMS/Formats/fmtall/FNP_01all.xml index 3a42b1bd24f28ba5770f0518d42c03f65e502c6f..a8c6dda6531733e2164b3972da8f39f4a249a0eb 100644 GIT binary patch delta 95 zcmaEHj^)mImJL=ClmCcwSQjy*GUPJkGn4`86b1!`0w7%kq>~v+8HyQ7fHJvI5hDhD n215pOAZf&40K}$~6$Q6%z9sQ!$7Ba7mdSDwVw?9|ToVca&FdNM delta 23 fcmca}p5?_kmJL=ClLJH+Z8np9uw%2qr8S`dh~W!W diff --git a/PROMS/Formats/fmtall/FNPall.xml b/PROMS/Formats/fmtall/FNPall.xml index 75dfa919b2f483d94eaf048bd743fd019e5226fa..d3295de4ee607e28b602ac311fa5290f12379de1 100644 GIT binary patch delta 126 zcmeyenCrz7t_@bklWR1ECi59{SQjy*GUPJkGn4`86b1!`0w7%kq>~v+8HyQ7fHJvI z5hDhD215pOAZf&40K}$~4NW(0er6o9d6F^DRr)LEE;#!a56CcIhW;i>Ha3y&Ik delta 18 acmaF1iS5%ywhhbFH)%BO+&t&usqFw?#R`i6 -- 2.47.2 From 8c358f1e3caf1cc7f60c8c5c07cf318b3ecbc356 Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 18 Feb 2025 07:42:35 -0500 Subject: [PATCH 4/7] C2024-038 - Bringing date control to the front so left side of box shows --- .../DisplayHistory.designer.cs | Bin 47962 -> 48008 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayHistory.designer.cs b/PROMS/Volian.Controls.Library/DisplayHistory.designer.cs index 2936956c4dcbf0d21f6e969610d0ed757eb701dc..0475e1c82df0fc0b2e54863b39c64a4ab54da5c4 100644 GIT binary patch delta 53 zcmcchjj7{1(*`Ts$u-;}lLKtiCf{)u1JRoe?6z@C-sK=MxyoH&@(oWBM)S#Y-6J>q Ix$~3&09id0{Qv*} delta 59 zcmeD9&UEV=(*`Ts$#>586^{S_ -- 2.47.2 From 05a13861acad903fd1d87e9bf70c78e2fef8065c Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 18 Feb 2025 15:21:19 -0500 Subject: [PATCH 5/7] B2025-019 RO Editor - When selecting an RO Definition, clicking the X in the corner or selecting Cancel prompts you to verify you want to close without saving changes when no changes were made if there is Parent/Child & applicability was never set for the in-use fields. --- PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs index f2dc6f34..e60a329c 100644 --- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs +++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs @@ -1584,7 +1584,7 @@ namespace ROEditor if (i + 1 < InUseList.Count) inuserecs = inuserecs + " "; } } - if (inuserecs != origFieldsInUse) + if ((inuserecs ?? "") != (origFieldsInUse ?? "")) return true; @@ -1599,7 +1599,7 @@ namespace ROEditor if (i + 1 < InUseApplcList.Count) applicfieldrecs = applicfieldrecs + " "; } } - if (applicfieldrecs != origApplicFields) + if ((applicfieldrecs ?? "") != (origApplicFields ?? "")) return true; //nothing has changed -- 2.47.2 From 535728b982f2131d21172f39b1c56731ff2aa8b8 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Tue, 18 Feb 2025 15:39:55 -0500 Subject: [PATCH 6/7] C2025-014 The zoom setting on step level bookmarks in generated PDFs will now jump to the page containing the step (like it does when a section bookmark is selected) instead of zooming in on the step. --- PROMS/Volian.Print.Library/vlnParagraph.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 381a3c95..73b089b4 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -647,8 +647,10 @@ namespace Volian.Print.Library } if (MyItemInfo.IsHigh) { + // C2025-014 change the zoom setting on the bookmark of a step from FITBH to FITV so that instead of zooming in + // on the step it will zoom to the page level ( like it does when you select a bookmark on a section. MyPageHelper.PageBookmarks.Add(MyItemInfo, (MyItemInfo.MyTab == null) ? "" : MyItemInfo.MyTab.CleanText + " " + MyItemInfo.DisplayText, - new PdfDestination(PdfDestination.FITBH, yLocation + YVeryTop - YTopMost + SixLinesPerInch)); + new PdfDestination(PdfDestination.FITV, yLocation + YVeryTop - YTopMost + SixLinesPerInch)); } } if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WolfcreekCKLFormat) -- 2.47.2 From 9980504c4717f1826daad76dcbacd0c115612ec0 Mon Sep 17 00:00:00 2001 From: mschill Date: Thu, 20 Feb 2025 10:03:05 -0500 Subject: [PATCH 7/7] B2025-015 RO Editor - PROMS will get stuck in a loop (hang) while placing RO.FST information in the plant database (loading RO's) when Unit Values contain brackets. Example is Point Beach data. Some of Point Beach RO's have curly braces in the RO return value for the units in P/C. Found this on some (5-7) Annunciator RO values. The definition of the return value (multiple return values) uses curly braces so PROMS cannot distinguish between brackets being part of a unit value or part of the format for multiple return values. Equipment Designation, Main Steam (MS), Annunciators have examples of return values with curly braces. Look at the Referenced Object Definition on the Annunciators tree node for the definition of the return value. --- .../LibSource/RODBInterface/VlnXml.cs | 2 +- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 411 +++--------------- 2 files changed, 59 insertions(+), 354 deletions(-) diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs index 82cbd45f..f44c1a8e 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs @@ -834,7 +834,7 @@ namespace RODBInterface ValueType |= FldType; if (PCApplicability) text = GetPCReturnValues(theDb, pcChildern, elm, PCApplicability, inusename, text); // C2021-026 Get P/C Children return values - strbld.Append(text); + strbld.Append(text.Replace("{", "&123;").Replace("}", "&125;")); } else { diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 47fcf4af..0d9474cf 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -19791,9 +19791,11 @@ GO *****************************************************************************/ /* ========================================================================================================== - Author: Jake Ropar Create Date: 06/23/2022 Description: Inserts New Rofst Child Record / Default Values + Modified: 02/19/2025 + Modification + Description: Added support for ROs with brackets in Unit Values ========================================================================================================== */ Create Procedure [dbo].[vesp_RofstChildInsert] @@ -19806,19 +19808,26 @@ GO @title VarChar(Max), @roid VarChar(50), @appid VarChar(Max) = null, - @value VarChar(Max) = null + @value VarChar(Max) = null, + @missingDefaultValue VarChar(Max) = null ) With Execute as Owner As Begin - Declare @AccPageID VarChar(Max) = null; + Declare @BaseAccPageID VarChar(Max) = null; Declare @DefaultValues VarChar(Max); + Declare @RoidExt VarChar(Max); + Declare @AccPageExt VarChar(Max); - -- Create Rofst Child/Group Record + -- Default missing value if Null (Null values not allowed for the [value] field in the RofstDefaultValue table + if (DataLength(IsNull(@missingDefaultValue, '')) <= 0) + Set @missingDefaultValue = '[TBD]'; + + -- Create Rofst Child/Group Record --> [Roid = (12) Digits] Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value]) - Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @value); + Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, REPLACE(REPLACE(@value, '&123;', '{'), '&125;', '}')); -- Check for appid, if exists, then insert the default value for each return type if multi-value @@ -19826,37 +19835,58 @@ GO Begin -- Get Accessory Page ID - Select @AccPageID = Concat(d.dbiAP, '-', @appid) + Select @BaseAccPageID = dbo.vefn_RofstDataCleanUnitInfoTags(Concat(d.dbiAP, '-', @appid), 1) From RofstDatabase d with (NoLock) Where d.RofstID = @RofstID And d.dbiID = @dbiID; - -- Insert Rofst Default Value (Parent RoChild) [roid = 12] - Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) - Values (@RofstID, @roid, Replace(@title, '\u160?', ' '), @AccPageID); + Select @DefaultValues = dbo.vefn_RofstDataReplaceVars(@value); - -- Insert Rofst Default Value(s) (Children RoChild) [roid = 16] (Do Not Insert Duplicates) - Select @DefaultValues = Replace(dbo.vefn_RofstDataReplaceVars(@value), '{', ''); + If (PatIndex('%=%', @DefaultValues) > 0) + Begin + + -- Insert Rofst Default Values (Multi-Values) --> [Roid = (16) Digits] + Select @DefaultValues = Replace(@DefaultValues, '{', ''); - With ChildrenValues as - ( - Select (x.ListPosition + 40) as 'OffsetIndex', - Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue' - From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x - Where Len(x.ListValue) > 0 - ) - Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) - Select @RofstID as 'RofstID', - Concat(@roid, Cast(Format(Min(OffsetIndex), 'D4') as VarChar(4))) as 'roid', - DefaultValue as 'value', - null as 'AccPageID' - From ChildrenValues - Group By DefaultValue - Order By Min(OffsetIndex) Asc + With ChildrenValues as + ( + Select x.ListPosition as 'OffsetIndex', + Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue' + From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x + Where Len(x.ListValue) > 0 + ) + Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) + Select @RofstID as 'RofstID', + Concat(@roid, re.RoidExt) as 'roid', + Case When (DataLength(cv.DefaultValue) > 0) Then + REPLACE(REPLACE(REPLACE(dbo.vefn_RofstDataCleanUnitInfoTags(cv.DefaultValue, 0), '&123;', '{'), '&125;}', '}'), '&125;', '}') + Else @missingDefaultValue End as 'value', + Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID' + From ChildrenValues cv + inner join vwRofstData_RofstExtensions re on re.Offset = cv.OffsetIndex + Order By cv.OffsetIndex Asc + + End + Else + Begin + + -- Insert Rofst Default Value (Single Value) --> [Roid = (16) Digits] + Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) + Select @RofstID as 'RofstID', + Concat(@roid, re.RoidExt) as 'roid', + Case When (DataLength(@DefaultValues) > 0) Then + REPLACE(REPLACE(REPLACE(dbo.vefn_RofstDataCleanUnitInfoTags(@DefaultValues, 0), '&123;', '{'), '&125;}', '}'), '&125;', '}') + Else @missingDefaultValue End as 'value', + Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID' + From vwRofstData_RofstExtensions re + Where re.Offset = 1; + + End End -- (Len(@appid) > 0) Return; + End Go @@ -20448,98 +20478,6 @@ GO ELSE PRINT 'Procedure Creation: [vesp_RofstDataGetExtensions] Error on Creation' GO - - - - /****** Object: StoredProcedure [dbo].[vesp_RofstChildInsert] ***********************/ - If Exists(SELECT * FROM sys.objects Where name = 'vesp_RofstChildInsert' AND type in (N'P')) - DROP PROCEDURE [dbo].[vesp_RofstChildInsert] - GO - - SET ANSI_NULLS ON - GO - SET QUOTED_IDENTIFIER ON - GO - - /***************************************************************************** - Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE - Copyright 2020 - Volian Enterprises, Inc. All rights reserved. - *****************************************************************************/ - /* - ========================================================================================================== - Author: Jake Ropar - Create Date: 03/24/2022 - Description: - ========================================================================================================== - */ - Create Procedure [dbo].[vesp_RofstChildInsert] - ( - @RofstID Int, - @ID Int, - @ParentID Int, - @dbiID Int, - @type Int, - @title VarChar(Max), - @roid VarChar(50), - @appid VarChar(Max) = null, - @value VarChar(Max) = null - ) - With Execute as Owner - As - Begin - - Declare @BaseAccPageID VarChar(Max) = null; - Declare @DefaultValues VarChar(Max); - - - -- Create Rofst Child/Group Record --> [Roid = (12) Digits] - Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value]) - Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @value); - - - -- Check for appid, if exists, then insert the default value for each return type if multi-value - If (Len(@appid) > 0) - Begin - - -- Get Accessory Page ID - Select @BaseAccPageID = dbo.vefn_RofstDataCleanUnitInfoTags(Concat(d.dbiAP, '-', @appid), 1) - From RofstDatabase d with (NoLock) - Where d.RofstID = @RofstID And d.dbiID = @dbiID; - - -- Insert Rofst Default Value(s) (Children RoChild) --> [Roid = (16) Digits] - Select @DefaultValues = Replace(dbo.vefn_RofstDataReplaceVars(@value), '{', ''); - - With ChildrenValues as - ( - Select x.ListPosition as 'OffsetIndex', - Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue' - From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x - Where Len(x.ListValue) > 0 - ) - Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) - Select @RofstID as 'RofstID', - Concat(@roid, re.RoidExt) as 'roid', - Case When (Len(RTrim(LTrim(cv.DefaultValue))) > 0 ) Then dbo.vefn_RofstDataCleanUnitInfoTags(cv.DefaultValue, 0) Else '[TBD]' End as 'value', - Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID' - From ChildrenValues cv - inner join vwRofstData_RofstExtensions re on re.Offset = cv.OffsetIndex - Order By cv.OffsetIndex Asc - - - End -- (Len(@appid) > 0) - - - Return; - - End - Go - - IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstChildInsert] Succeeded' - ELSE PRINT 'Procedure Creation: [vesp_RofstChildInsert] Error on Creation' - GO - - - /****** Object: StoredProcedure [dbo].[vesp_RofstDataSearch] ***********************/ If Exists(SELECT * FROM sys.objects Where name = 'vesp_RofstDataSearch' AND type in (N'P')) DROP PROCEDURE [dbo].[vesp_RofstDataSearch] @@ -21239,121 +21177,6 @@ GO ========================================================================================================== */ - -IF EXISTS (Select * From dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[vesp_RofstChildInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) - DROP Procedure [dbo].[vesp_RofstChildInsert]; -GO - -SET ANSI_NULLS ON -GO - -SET QUOTED_IDENTIFIER ON -GO - - -/***************************************************************************** - Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE - Copyright 2020 - Volian Enterprises, Inc. All rights reserved. -*****************************************************************************/ -/* -========================================================================================================== - Author: Jake Ropar - Create Date: 03/24/2022 - Description: Inserts the RO Child object and associated return values -========================================================================================================== - */ -Create Procedure [dbo].[vesp_RofstChildInsert] -( - @RofstID Int, - @ID Int, - @ParentID Int, - @dbiID Int, - @type Int, - @title VarChar(Max), - @roid VarChar(50), - @appid VarChar(Max) = null, - @value VarChar(Max) = null -) -With Execute as Owner -As -Begin - - Declare @BaseAccPageID VarChar(Max) = null; - Declare @DefaultValues VarChar(Max); - - Declare @RoidExt VarChar(Max); - Declare @AccPageExt VarChar(Max); - - - -- Create Rofst Child/Group Record --> [Roid = (12) Digits] - Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value]) - Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @value); - - - -- Check for appid, if exists, then insert the default value for each return type if multi-value - If (Len(@appid) > 0) - Begin - - -- Get Accessory Page ID - Select @BaseAccPageID = dbo.vefn_RofstDataCleanUnitInfoTags(Concat(d.dbiAP, '-', @appid), 1) - From RofstDatabase d with (NoLock) - Where d.RofstID = @RofstID And d.dbiID = @dbiID; - - Select @DefaultValues = dbo.vefn_RofstDataReplaceVars(@value); - - If (PatIndex('%=%', @DefaultValues) > 0) - Begin - - -- Insert Rofst Default Values (Multi-Values) --> [Roid = (16) Digits] - Select @DefaultValues = Replace(@DefaultValues, '{', ''); - - With ChildrenValues as - ( - Select x.ListPosition as 'OffsetIndex', - Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue' - From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x - Where Len(x.ListValue) > 0 - ) - Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) - Select @RofstID as 'RofstID', - Concat(@roid, re.RoidExt) as 'roid', - Case When (Len(RTrim(LTrim(cv.DefaultValue))) > 0 ) Then dbo.vefn_RofstDataCleanUnitInfoTags(cv.DefaultValue, 0) Else '[TBD]' End as 'value', - Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID' - From ChildrenValues cv - inner join vwRofstData_RofstExtensions re on re.Offset = cv.OffsetIndex - Order By cv.OffsetIndex Asc - - End - Else - Begin - - -- Insert Rofst Default Value (Single Value) --> [Roid = (16) Digits] - Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) - Select @RofstID as 'RofstID', - Concat(@roid, re.RoidExt) as 'roid', - Case When (Len(RTrim(LTrim(@DefaultValues))) > 0 ) Then dbo.vefn_RofstDataCleanUnitInfoTags(@DefaultValues, 0) Else '[TBD]' End as 'value', - Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID' - From vwRofstData_RofstExtensions re - Where re.Offset = 1; - - End - - End -- (Len(@appid) > 0) - - - Return; - -End -Go - -IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstChildInsert] Succeeded' -ELSE PRINT 'Procedure Creation: [vesp_RofstChildInsert] Error on Creation' -GO - - - - - If Exists(SELECT * FROM sys.objects Where name = 'vefn_RofstDataReplaceVars' AND type in (N'FN')) DROP FUNCTION [dbo].[vefn_RofstDataReplaceVars] GO @@ -21632,124 +21455,6 @@ GO ELSE PRINT 'Function Creation: [vefn_RofstDataCleanUnitInfoTags] Error on Creation' GO - - - If Exists(SELECT * FROM sys.objects Where name = 'vesp_RofstChildInsert' AND type in (N'P')) - DROP PROCEDURE [dbo].[vesp_RofstChildInsert] - GO - - SET ANSI_NULLS ON - GO - SET QUOTED_IDENTIFIER ON - GO - - /***************************************************************************** - Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE - Copyright 2020 - Volian Enterprises, Inc. All rights reserved. - *****************************************************************************/ - /* - ========================================================================================================== - Author: Jake Ropar - Create Date: 03/24/2022 - Description: Inserts the RO Child object and associated return values - ========================================================================================================== - */ - Create Procedure [dbo].[vesp_RofstChildInsert] - ( - @RofstID Int, - @ID Int, - @ParentID Int, - @dbiID Int, - @type Int, - @title VarChar(Max), - @roid VarChar(50), - @appid VarChar(Max) = null, - @value VarChar(Max) = null, - @missingDefaultValue VarChar(Max) = null - ) - With Execute as Owner - As - Begin - - Declare @BaseAccPageID VarChar(Max) = null; - Declare @DefaultValues VarChar(Max); - - Declare @RoidExt VarChar(Max); - Declare @AccPageExt VarChar(Max); - - -- Default missing value if Null (Null values not allowed for the [value] field in the RofstDefaultValue table - if (DataLength(IsNull(@missingDefaultValue, '')) <= 0) - Set @missingDefaultValue = '[TBD]'; - - -- Create Rofst Child/Group Record --> [Roid = (12) Digits] - Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value]) - Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @value); - - - -- Check for appid, if exists, then insert the default value for each return type if multi-value - If (Len(@appid) > 0) - Begin - - -- Get Accessory Page ID - Select @BaseAccPageID = dbo.vefn_RofstDataCleanUnitInfoTags(Concat(d.dbiAP, '-', @appid), 1) - From RofstDatabase d with (NoLock) - Where d.RofstID = @RofstID And d.dbiID = @dbiID; - - Select @DefaultValues = dbo.vefn_RofstDataReplaceVars(@value); - - If (PatIndex('%=%', @DefaultValues) > 0) - Begin - - -- Insert Rofst Default Values (Multi-Values) --> [Roid = (16) Digits] - Select @DefaultValues = Replace(@DefaultValues, '{', ''); - - With ChildrenValues as - ( - Select x.ListPosition as 'OffsetIndex', - Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue' - From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x - Where Len(x.ListValue) > 0 - ) - Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) - Select @RofstID as 'RofstID', - Concat(@roid, re.RoidExt) as 'roid', - Case When (DataLength(cv.DefaultValue) > 0) Then dbo.vefn_RofstDataCleanUnitInfoTags(cv.DefaultValue, 0) Else @missingDefaultValue End as 'value', - Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID' - From ChildrenValues cv - inner join vwRofstData_RofstExtensions re on re.Offset = cv.OffsetIndex - Order By cv.OffsetIndex Asc - - End - Else - Begin - - -- Insert Rofst Default Value (Single Value) --> [Roid = (16) Digits] - Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID) - Select @RofstID as 'RofstID', - Concat(@roid, re.RoidExt) as 'roid', - Case When (DataLength(@DefaultValues) > 0) Then dbo.vefn_RofstDataCleanUnitInfoTags(@DefaultValues, 0) Else @missingDefaultValue End as 'value', - Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID' - From vwRofstData_RofstExtensions re - Where re.Offset = 1; - - End - - End -- (Len(@appid) > 0) - - - Return; - - End - Go - - - - IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstChildInsert] Succeeded' - ELSE PRINT 'Procedure Creation: [vesp_RofstChildInsert] Error on Creation' - GO - - - /* ========================================================================================================== End: B2022-124: [JPR] Blank RO Values (All Spaces) printing as ? @@ -24132,8 +23837,8 @@ BEGIN TRY -- Try Block DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '10/28/2024 11:24' - set @RevDescription = 'Add the ability for PROMS to remember the procedure tabs that were open when you closed PROMS' + set @RevDate = '2/19/2025 11:24' + set @RevDescription = 'Added support for legacy ROs with brackets in Unit Values' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription -- 2.47.2