From d75d5d267801309d8635d0b4c9a74b3de9954035 Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 14 Aug 2026 16:32:32 -0500 Subject: [PATCH] GitHub Issue 1219: DataRegion call to saveQueryViews does not need to include view 'fields' info in post - backport from develop --- api/webapp/clientapi/dom/DataRegion.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/webapp/clientapi/dom/DataRegion.js b/api/webapp/clientapi/dom/DataRegion.js index cfc89dd65dc..7cea7215eef 100644 --- a/api/webapp/clientapi/dom/DataRegion.js +++ b/api/webapp/clientapi/dom/DataRegion.js @@ -2889,6 +2889,15 @@ if (!LABKEY.DataRegions) { session: true }); + // GitHub Issue 1219: the 'fields' column-metadata for the view is never used on the server-side save action + // so it can be removed from the payload. Also, only fieldKey/title are read per column so we can trim down that as well. + delete viewConfig.fields; + if (LABKEY.Utils.isArray(viewConfig.columns)) { + viewConfig.columns = $.map(viewConfig.columns, function(col) { + return col.title ? { fieldKey: col.fieldKey, title: col.title } : { fieldKey: col.fieldKey }; + }); + } + LABKEY.Query.saveQueryViews({ containerPath: this.containerPath, schemaName: this.schemaName,