From 43083c66f25f92ef6a79b18e73e9629bed1fa045 Mon Sep 17 00:00:00 2001 From: XingY Date: Mon, 17 Aug 2026 13:10:42 -0700 Subject: [PATCH 1/2] GitHub Issue 1474: block reserved fields to be used as import alias --- api/src/org/labkey/api/exp/property/DomainUtil.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/org/labkey/api/exp/property/DomainUtil.java b/api/src/org/labkey/api/exp/property/DomainUtil.java index 93e19bfd681..40ba5211c8f 100644 --- a/api/src/org/labkey/api/exp/property/DomainUtil.java +++ b/api/src/org/labkey/api/exp/property/DomainUtil.java @@ -1704,6 +1704,10 @@ public static ValidationException validateProperties(@Nullable Domain domain, @N if (fieldNames.contains(alias)) addImportAliasErrors(exception, updates, fields, "Import alias '" + alias + "' on field" + (fields.size() == 1 ? " " : "s ") + names + " conflicts with a field name."); + + // GH Issue 1474: 'Container' should not be allowed as valid Import Alias + if (reservedNames.contains(alias)) + addImportAliasErrors(exception, updates, fields, "Import alias '" + alias + "' on field" + (fields.size() == 1 ? " " : "s ") + names + " conflicts with a reserved field name."); }); return exception; From 5c39e41cb3b6e49d7686062a7c1dda28dc72a97b Mon Sep 17 00:00:00 2001 From: XingY Date: Mon, 17 Aug 2026 17:14:45 -0700 Subject: [PATCH 2/2] metric --- experiment/src/org/labkey/experiment/ExperimentModule.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/experiment/src/org/labkey/experiment/ExperimentModule.java b/experiment/src/org/labkey/experiment/ExperimentModule.java index 7031a78b301..dd311fa29c8 100644 --- a/experiment/src/org/labkey/experiment/ExperimentModule.java +++ b/experiment/src/org/labkey/experiment/ExperimentModule.java @@ -979,6 +979,8 @@ SELECT COUNT(DISTINCT DD.DomainURI) FROM results.put("maxObjectObjectId", new SqlSelector(schema, "SELECT MAX(ObjectId) FROM exp.Object").getObject(Long.class)); results.put("maxMaterialRowId", new SqlSelector(schema, "SELECT MAX(RowId) FROM exp.Material").getObject(Long.class)); + results.put("domainFieldsWithContainerAlias", new SqlSelector(schema, "SELECT COUNT(*) FROM exp.propertydescriptor WHERE LOWER(importaliases) = 'container' OR importaliases ILIKE '%, container' OR importaliases ILIKE 'container, %' OR importaliases ILIKE '%, container, %'").getObject(Long.class)); + results.putAll(ExperimentService.get().getDomainMetrics()); return results;