From a58ef4ecdd13f7231f4d51400548fa8b89ecd2b9 Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 13 Nov 2026 11:22:16 -0500 Subject: [PATCH] B2026-094 When you paste a Caution, Note, or high-level step that has background information tied to it into a substep or an RNO step, PROMS should NOT paste the background information --- PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs index 87caae27..9fd21006 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs @@ -2469,7 +2469,7 @@ namespace VEPROMS.CSLA.Library DialogResult rslt = DialogResult.No; SectionConfig secCfg = itemInfo.ActiveSection.MyConfig as SectionConfig; - if (copyItemInfo.HasEnhancedLinkedStep && secCfg.MyEnhancedDocuments.Count > 0) + if (copyItemInfo.HasEnhancedLinkedStep && secCfg.MyEnhancedDocuments.Count > 0 && IsValidTypeToCopybackground(itemInfo, copyItemInfo)) rslt = FlexibleMessageBox.Show("The step you are copying contains linked background documents." + "\r\n\r\nDo you also wish to make a copy of the background documents?", "Paste background documents", MessageBoxButtons.YesNo, MessageBoxIcon.Question); @@ -2618,8 +2618,15 @@ namespace VEPROMS.CSLA.Library } } } + + // B2026-094 + // When you paste a Caution, Note, or high level step that has background information tied to it + // into a substep or an RNO step + // PROMS should NOT paste the background information + public static bool IsValidTypeToCopybackground(ItemInfo itemInfo, ItemInfo copyItemInfo) => (!copyItemInfo.IsCaution && !copyItemInfo.IsNote && !copyItemInfo.IsHigh) || (!itemInfo.IsInRNO && !itemInfo.IsSubStep); + #endregion - private static bool HandleSqlExceptionOnCopy(Exception ex) + private static bool HandleSqlExceptionOnCopy(Exception ex) { if (ex.Message.Contains("This step has been deleted")) {