You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/src/org/labkey/api/data/AbstractTableInfo.java
+16-6Lines changed: 16 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2051,13 +2051,19 @@ public void fireRowTrigger(
2051
2051
2052
2052
Stringmessage = "Trigger '" + script.getName() + "' attempted to " + String.join(", ", diffs) + ". Declare managed columns to include them in the column set.";
2053
2053
if (manageColumns)
2054
+
{
2054
2055
errors.addGlobalError(message);
2055
-
else
2056
-
LOG.warn(message + " This will be an error if invoked via data iteration.");
2056
+
break;
2057
+
}
2058
+
2059
+
LOG.warn(message + " This will be an error if invoked via data iteration.");
2057
2060
}
2058
2061
}
2059
2062
2060
-
// Verify the trigger handles every managed column
2063
+
if (errors.hasErrors())
2064
+
break;
2065
+
2066
+
// Verify the trigger handles all managed columns
2061
2067
if (managedCols != null)
2062
2068
{
2063
2069
for (varcol : managedCols)
@@ -2066,9 +2072,13 @@ public void fireRowTrigger(
2066
2072
{
2067
2073
Stringmessage = "Trigger '" + script.getName() + "' declared the managed column '" + col + "' but did not set a value for it. Set null to clear or provide a value.";
2068
2074
if (manageColumns)
2069
-
errors.addFieldError(col, message);
2070
-
else
2071
-
LOG.warn(message + " This will be an error if invoked via data iteration.");
2075
+
{
2076
+
// Not using errors.addFieldError() here as the managed column may not be visible
2077
+
errors.addGlobalError(message);
2078
+
break;
2079
+
}
2080
+
2081
+
LOG.warn(message + " This will be an error if invoked via data iteration.");
0 commit comments