From a2b5af1ee02843c965b68e9f66899eab3a78f5d1 Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 23 Jan 2026 09:36:29 -0600 Subject: [PATCH 1/7] update @labkey/components package version --- assay/package-lock.json | 8 ++++---- assay/package.json | 2 +- core/package-lock.json | 8 ++++---- core/package.json | 2 +- experiment/package-lock.json | 8 ++++---- experiment/package.json | 2 +- pipeline/package-lock.json | 8 ++++---- pipeline/package.json | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/assay/package-lock.json b/assay/package-lock.json index 35b187b94e3..39c258782ea 100644 --- a/assay/package-lock.json +++ b/assay/package-lock.json @@ -8,7 +8,7 @@ "name": "assay", "version": "0.0.0", "dependencies": { - "@labkey/components": "7.13.0" + "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", @@ -2525,9 +2525,9 @@ } }, "node_modules/@labkey/components": { - "version": "7.13.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0.tgz", - "integrity": "sha512-+2o42no7q9IInKbvSd5XHDrnmLKucgudQ+7C2FD6ya+Da8mRu76GWG6L168iwbtMaguQZzFQmMGpD5VScWZiyQ==", + "version": "7.13.0-fb-crossSampleTypeWarnings.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0-fb-crossSampleTypeWarnings.0.tgz", + "integrity": "sha512-XtsANhW34jY/UDQMXH589hA/SoG41lytd3JyRs02om3DcCkjd4pgtkFVG5LV+OYfYTktBsrKRDkl5hHDPx1zSg==", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/assay/package.json b/assay/package.json index 256423f62ca..f82da023f4f 100644 --- a/assay/package.json +++ b/assay/package.json @@ -12,7 +12,7 @@ "clean": "rimraf resources/web/assay/gen && rimraf resources/views/gen && rimraf resources/web/gen" }, "dependencies": { - "@labkey/components": "7.13.0" + "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", diff --git a/core/package-lock.json b/core/package-lock.json index c9c708e80a2..eec9f308e50 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -8,7 +8,7 @@ "name": "labkey-core", "version": "0.0.0", "dependencies": { - "@labkey/components": "7.13.0", + "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0", "@labkey/themes": "1.5.0" }, "devDependencies": { @@ -3547,9 +3547,9 @@ } }, "node_modules/@labkey/components": { - "version": "7.13.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0.tgz", - "integrity": "sha512-+2o42no7q9IInKbvSd5XHDrnmLKucgudQ+7C2FD6ya+Da8mRu76GWG6L168iwbtMaguQZzFQmMGpD5VScWZiyQ==", + "version": "7.13.0-fb-crossSampleTypeWarnings.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0-fb-crossSampleTypeWarnings.0.tgz", + "integrity": "sha512-XtsANhW34jY/UDQMXH589hA/SoG41lytd3JyRs02om3DcCkjd4pgtkFVG5LV+OYfYTktBsrKRDkl5hHDPx1zSg==", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/core/package.json b/core/package.json index 2c1202f3221..8689189091b 100644 --- a/core/package.json +++ b/core/package.json @@ -53,7 +53,7 @@ } }, "dependencies": { - "@labkey/components": "7.13.0", + "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0", "@labkey/themes": "1.5.0" }, "devDependencies": { diff --git a/experiment/package-lock.json b/experiment/package-lock.json index c3ed56aedca..720e9515f2c 100644 --- a/experiment/package-lock.json +++ b/experiment/package-lock.json @@ -8,7 +8,7 @@ "name": "experiment", "version": "0.0.0", "dependencies": { - "@labkey/components": "7.13.0" + "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", @@ -3314,9 +3314,9 @@ } }, "node_modules/@labkey/components": { - "version": "7.13.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0.tgz", - "integrity": "sha512-+2o42no7q9IInKbvSd5XHDrnmLKucgudQ+7C2FD6ya+Da8mRu76GWG6L168iwbtMaguQZzFQmMGpD5VScWZiyQ==", + "version": "7.13.0-fb-crossSampleTypeWarnings.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0-fb-crossSampleTypeWarnings.0.tgz", + "integrity": "sha512-XtsANhW34jY/UDQMXH589hA/SoG41lytd3JyRs02om3DcCkjd4pgtkFVG5LV+OYfYTktBsrKRDkl5hHDPx1zSg==", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/experiment/package.json b/experiment/package.json index 6601245661c..5cd0f7c554f 100644 --- a/experiment/package.json +++ b/experiment/package.json @@ -13,7 +13,7 @@ "test-integration": "cross-env NODE_ENV=test jest --ci --runInBand -c test/js/jest.config.integration.js" }, "dependencies": { - "@labkey/components": "7.13.0" + "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", diff --git a/pipeline/package-lock.json b/pipeline/package-lock.json index 48c81d988c3..747c49b507b 100644 --- a/pipeline/package-lock.json +++ b/pipeline/package-lock.json @@ -8,7 +8,7 @@ "name": "pipeline", "version": "0.0.0", "dependencies": { - "@labkey/components": "7.13.0" + "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", @@ -2759,9 +2759,9 @@ } }, "node_modules/@labkey/components": { - "version": "7.13.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0.tgz", - "integrity": "sha512-+2o42no7q9IInKbvSd5XHDrnmLKucgudQ+7C2FD6ya+Da8mRu76GWG6L168iwbtMaguQZzFQmMGpD5VScWZiyQ==", + "version": "7.13.0-fb-crossSampleTypeWarnings.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0-fb-crossSampleTypeWarnings.0.tgz", + "integrity": "sha512-XtsANhW34jY/UDQMXH589hA/SoG41lytd3JyRs02om3DcCkjd4pgtkFVG5LV+OYfYTktBsrKRDkl5hHDPx1zSg==", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/pipeline/package.json b/pipeline/package.json index 6b66776e2ab..c441c944d75 100644 --- a/pipeline/package.json +++ b/pipeline/package.json @@ -14,7 +14,7 @@ "build-prod": "npm run clean && cross-env NODE_ENV=production PROD_SOURCE_MAP=source-map webpack --config node_modules/@labkey/build/webpack/prod.config.js --color --progress --profile" }, "dependencies": { - "@labkey/components": "7.13.0" + "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", From 723dfbfec53ea0d44194c1424ad723b464753e5d Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 23 Jan 2026 09:41:21 -0600 Subject: [PATCH 2/7] InferDomainAction update to take optional param for a list of columns to get distinct values for based on the data file contents --- .../property/PropertyController.java | 51 ++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java b/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java index 76a98ccc8a9..a7a74fd89ed 100644 --- a/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java +++ b/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java @@ -126,6 +126,7 @@ import java.io.PrintWriter; import java.io.Writer; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -1215,7 +1216,7 @@ else if (fileMap.size() == 1) throw new IllegalArgumentException("Unable to find a posted file or the file for the posted id/path."); } - return getInferDomainResponse(loader, form.getNumLinesToInclude(), form.isCheckCommentLineCount(), form.getDomainKindName()); + return getInferDomainResponse(loader, form); } finally { @@ -1223,9 +1224,13 @@ else if (fileMap.size() == 1) } } - private ApiSimpleResponse getInferDomainResponse(DataLoader loader, Integer numLinesToInclude, boolean checkCommentLineCount, String domainKindName) throws IOException + private ApiSimpleResponse getInferDomainResponse(DataLoader loader, InferDomainForm form) throws IOException { ApiSimpleResponse response = new ApiSimpleResponse(); + Integer numLinesToInclude = form.getNumLinesToInclude(); + boolean checkCommentLineCount = form.isCheckCommentLineCount(); + String domainKindName = form.getDomainKindName(); + Collection distinctValueColumns = form.getDistinctValueColumns(); List fields = new ArrayList<>(); List reservedFields = new ArrayList<>(); @@ -1258,12 +1263,43 @@ private ApiSimpleResponse getInferDomainResponse(DataLoader loader, Integer numL { response.put("commentLineCount", loader.getCommentLineCount()); } + if (distinctValueColumns != null && !distinctValueColumns.isEmpty()) + { + response.put("distinctValues", getDistinctValues(loader, distinctValueColumns)); + } } response.put("fields", fields); response.put("reservedFields", reservedFields); return response; } + + /** + * Iterate through the data and get the distinct values for the specified columns. + * Response is a map of column name to set of distinct string values, for those columns + * that have at least one non-null value. + */ + private Map> getDistinctValues(DataLoader loader, Collection colKeys) throws IOException + { + Map> distinctValuesMap = new HashMap<>(); + try (var iter = loader.iterator()) + { + while (iter.hasNext()) + { + Map values = iter.next(); + if (values == null) + continue; + + for (String key : colKeys) + { + Object val = values.get(key); + if (val != null) + distinctValuesMap.computeIfAbsent(key, k -> new HashSet<>()).add(val.toString()); + } + } + } + return distinctValuesMap; + } } public static class InferDomainForm @@ -1274,6 +1310,7 @@ public static class InferDomainForm private String _domainKindName; private boolean _guessFormatAsTSV; private boolean _checkCommentLineCount; + private Collection _distinctValueColumns; public Integer getNumLinesToInclude() { @@ -1324,6 +1361,16 @@ public void setCheckCommentLineCount(boolean checkCommentLineCount) { _checkCommentLineCount = checkCommentLineCount; } + + public Collection getDistinctValueColumns() + { + return _distinctValueColumns; + } + + public void setDistinctValueColumns(Collection distinctValueColumns) + { + _distinctValueColumns = distinctValueColumns; + } } /** From f4c894ed22ea408b93bad66aa491b7c173642c19 Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 23 Jan 2026 15:50:33 -0600 Subject: [PATCH 3/7] InferDomain distinctValues map to use CaseInsensitiveHashSet for distinct values --- .../experiment/controllers/property/PropertyController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java b/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java index a7a74fd89ed..db7f894a674 100644 --- a/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java +++ b/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java @@ -1294,7 +1294,7 @@ private Map> getDistinctValues(DataLoader loader, Collection { Object val = values.get(key); if (val != null) - distinctValuesMap.computeIfAbsent(key, k -> new HashSet<>()).add(val.toString()); + distinctValuesMap.computeIfAbsent(key, k -> new CaseInsensitiveHashSet()).add(val.toString()); } } } From 5a5b2316af6946923ae9b7319a8079783d7dc104 Mon Sep 17 00:00:00 2001 From: cnathe Date: Mon, 26 Jan 2026 13:50:17 -0600 Subject: [PATCH 4/7] Test fixes for error message single quote to bold --- api/src/org/labkey/api/query/AbstractQueryUpdateService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/org/labkey/api/query/AbstractQueryUpdateService.java b/api/src/org/labkey/api/query/AbstractQueryUpdateService.java index 1b64835bb42..26a5d4cc6e0 100644 --- a/api/src/org/labkey/api/query/AbstractQueryUpdateService.java +++ b/api/src/org/labkey/api/query/AbstractQueryUpdateService.java @@ -214,7 +214,7 @@ public Map> getExistingRows(User user, Container co if (StringUtils.isEmpty(dataContainer)) dataContainer = (String) row.get("folder"); if (!container.getId().equals(dataContainer)) - throw new InvalidKeyException("Data doesn't belong to folder '" + container.getName() + "': " + key.getValue().values()); + throw new InvalidKeyException("Data does not belong to folder '" + container.getName() + "': " + key.getValue().values()); } } else if (verifyExisting) From b69975aa47d6b44810bc1bd8bd5b9b309574f7da Mon Sep 17 00:00:00 2001 From: cnathe Date: Mon, 26 Jan 2026 15:24:02 -0600 Subject: [PATCH 5/7] update @labkey/components package version --- assay/package-lock.json | 8 ++++---- assay/package.json | 2 +- core/package-lock.json | 8 ++++---- core/package.json | 2 +- experiment/package-lock.json | 8 ++++---- experiment/package.json | 2 +- pipeline/package-lock.json | 8 ++++---- pipeline/package.json | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/assay/package-lock.json b/assay/package-lock.json index 39c258782ea..0089c3a74a4 100644 --- a/assay/package-lock.json +++ b/assay/package-lock.json @@ -8,7 +8,7 @@ "name": "assay", "version": "0.0.0", "dependencies": { - "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" + "@labkey/components": "7.13.1-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", @@ -2525,9 +2525,9 @@ } }, "node_modules/@labkey/components": { - "version": "7.13.0-fb-crossSampleTypeWarnings.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0-fb-crossSampleTypeWarnings.0.tgz", - "integrity": "sha512-XtsANhW34jY/UDQMXH589hA/SoG41lytd3JyRs02om3DcCkjd4pgtkFVG5LV+OYfYTktBsrKRDkl5hHDPx1zSg==", + "version": "7.13.1-fb-crossSampleTypeWarnings.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.1-fb-crossSampleTypeWarnings.0.tgz", + "integrity": "sha512-I4nhWVUXt5NcuvdfcRWk7MfE3BbnUT25jxW5W00a4JWNnrwVeR/ZIp3js2l0+DwZ2xTlgiv9qbg6bF6XcecHrQ==", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/assay/package.json b/assay/package.json index f82da023f4f..a22077e8dc0 100644 --- a/assay/package.json +++ b/assay/package.json @@ -12,7 +12,7 @@ "clean": "rimraf resources/web/assay/gen && rimraf resources/views/gen && rimraf resources/web/gen" }, "dependencies": { - "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" + "@labkey/components": "7.13.1-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", diff --git a/core/package-lock.json b/core/package-lock.json index eec9f308e50..348527e8311 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -8,7 +8,7 @@ "name": "labkey-core", "version": "0.0.0", "dependencies": { - "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0", + "@labkey/components": "7.13.1-fb-crossSampleTypeWarnings.0", "@labkey/themes": "1.5.0" }, "devDependencies": { @@ -3547,9 +3547,9 @@ } }, "node_modules/@labkey/components": { - "version": "7.13.0-fb-crossSampleTypeWarnings.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0-fb-crossSampleTypeWarnings.0.tgz", - "integrity": "sha512-XtsANhW34jY/UDQMXH589hA/SoG41lytd3JyRs02om3DcCkjd4pgtkFVG5LV+OYfYTktBsrKRDkl5hHDPx1zSg==", + "version": "7.13.1-fb-crossSampleTypeWarnings.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.1-fb-crossSampleTypeWarnings.0.tgz", + "integrity": "sha512-I4nhWVUXt5NcuvdfcRWk7MfE3BbnUT25jxW5W00a4JWNnrwVeR/ZIp3js2l0+DwZ2xTlgiv9qbg6bF6XcecHrQ==", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/core/package.json b/core/package.json index 8689189091b..7a54f61590d 100644 --- a/core/package.json +++ b/core/package.json @@ -53,7 +53,7 @@ } }, "dependencies": { - "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0", + "@labkey/components": "7.13.1-fb-crossSampleTypeWarnings.0", "@labkey/themes": "1.5.0" }, "devDependencies": { diff --git a/experiment/package-lock.json b/experiment/package-lock.json index 720e9515f2c..cf19ae767a5 100644 --- a/experiment/package-lock.json +++ b/experiment/package-lock.json @@ -8,7 +8,7 @@ "name": "experiment", "version": "0.0.0", "dependencies": { - "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" + "@labkey/components": "7.13.1-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", @@ -3314,9 +3314,9 @@ } }, "node_modules/@labkey/components": { - "version": "7.13.0-fb-crossSampleTypeWarnings.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0-fb-crossSampleTypeWarnings.0.tgz", - "integrity": "sha512-XtsANhW34jY/UDQMXH589hA/SoG41lytd3JyRs02om3DcCkjd4pgtkFVG5LV+OYfYTktBsrKRDkl5hHDPx1zSg==", + "version": "7.13.1-fb-crossSampleTypeWarnings.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.1-fb-crossSampleTypeWarnings.0.tgz", + "integrity": "sha512-I4nhWVUXt5NcuvdfcRWk7MfE3BbnUT25jxW5W00a4JWNnrwVeR/ZIp3js2l0+DwZ2xTlgiv9qbg6bF6XcecHrQ==", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/experiment/package.json b/experiment/package.json index 5cd0f7c554f..9541dcc3f8f 100644 --- a/experiment/package.json +++ b/experiment/package.json @@ -13,7 +13,7 @@ "test-integration": "cross-env NODE_ENV=test jest --ci --runInBand -c test/js/jest.config.integration.js" }, "dependencies": { - "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" + "@labkey/components": "7.13.1-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", diff --git a/pipeline/package-lock.json b/pipeline/package-lock.json index 747c49b507b..7dd32972779 100644 --- a/pipeline/package-lock.json +++ b/pipeline/package-lock.json @@ -8,7 +8,7 @@ "name": "pipeline", "version": "0.0.0", "dependencies": { - "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" + "@labkey/components": "7.13.1-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", @@ -2759,9 +2759,9 @@ } }, "node_modules/@labkey/components": { - "version": "7.13.0-fb-crossSampleTypeWarnings.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.0-fb-crossSampleTypeWarnings.0.tgz", - "integrity": "sha512-XtsANhW34jY/UDQMXH589hA/SoG41lytd3JyRs02om3DcCkjd4pgtkFVG5LV+OYfYTktBsrKRDkl5hHDPx1zSg==", + "version": "7.13.1-fb-crossSampleTypeWarnings.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-7.13.1-fb-crossSampleTypeWarnings.0.tgz", + "integrity": "sha512-I4nhWVUXt5NcuvdfcRWk7MfE3BbnUT25jxW5W00a4JWNnrwVeR/ZIp3js2l0+DwZ2xTlgiv9qbg6bF6XcecHrQ==", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/pipeline/package.json b/pipeline/package.json index c441c944d75..ec8b263d98e 100644 --- a/pipeline/package.json +++ b/pipeline/package.json @@ -14,7 +14,7 @@ "build-prod": "npm run clean && cross-env NODE_ENV=production PROD_SOURCE_MAP=source-map webpack --config node_modules/@labkey/build/webpack/prod.config.js --color --progress --profile" }, "dependencies": { - "@labkey/components": "7.13.0-fb-crossSampleTypeWarnings.0" + "@labkey/components": "7.13.1-fb-crossSampleTypeWarnings.0" }, "devDependencies": { "@labkey/build": "8.7.0", From 2939d17f2672e52b745f6bb327a2936d590607a9 Mon Sep 17 00:00:00 2001 From: cnathe Date: Wed, 28 Jan 2026 09:08:13 -0600 Subject: [PATCH 6/7] Update text for "can't upload attachment" error message for consistency --- api/src/org/labkey/api/dataiterator/AttachmentDataIterator.java | 2 +- .../org/labkey/experiment/api/ExpDataClassDataTableImpl.java | 2 +- list/src/org/labkey/list/model/ListQueryUpdateService.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/org/labkey/api/dataiterator/AttachmentDataIterator.java b/api/src/org/labkey/api/dataiterator/AttachmentDataIterator.java index c8065c52077..05266bc05fc 100644 --- a/api/src/org/labkey/api/dataiterator/AttachmentDataIterator.java +++ b/api/src/org/labkey/api/dataiterator/AttachmentDataIterator.java @@ -172,7 +172,7 @@ else if (attachmentValue instanceof File file) private ValidationException propertyValidationException(DomainProperty property, Object value) { - return rowValidationException(String.format("Can't upload '%s' to field %s with type %s.", value, property.getName(), property.getType().getLabel())); + return rowValidationException(String.format("Cannot upload '%s' to %s type field '%s'.", value, property.getType().getLabel(), property.getName())); } private ValidationException rowValidationException(String message) diff --git a/experiment/src/org/labkey/experiment/api/ExpDataClassDataTableImpl.java b/experiment/src/org/labkey/experiment/api/ExpDataClassDataTableImpl.java index f4178e1dbca..2e6bc7b6375 100644 --- a/experiment/src/org/labkey/experiment/api/ExpDataClassDataTableImpl.java +++ b/experiment/src/org/labkey/experiment/api/ExpDataClassDataTableImpl.java @@ -1461,7 +1461,7 @@ protected Map _update(User user, Container c, Map updateRow(User user, Container container, Map Date: Wed, 28 Jan 2026 17:04:31 -0600 Subject: [PATCH 7/7] More convert helper error message consistency --- api/src/org/labkey/api/data/ConvertHelper.java | 2 +- study/test/src/org/labkey/test/tests/study/AssayTest.java | 2 +- .../src/org/labkey/test/tests/study/LinkAssayToStudyTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/org/labkey/api/data/ConvertHelper.java b/api/src/org/labkey/api/data/ConvertHelper.java index 47c1ee02103..f063bed4d0e 100644 --- a/api/src/org/labkey/api/data/ConvertHelper.java +++ b/api/src/org/labkey/api/data/ConvertHelper.java @@ -1278,7 +1278,7 @@ public static String getStandardConversionErrorMessage(Object value, String fiel // Issue 50768: Need a better error message if date value is not in the expected format. if (fieldType.equalsIgnoreCase("date") || fieldType.equalsIgnoreCase("datetime") || fieldType.equalsIgnoreCase("timestamp")) - return "'" + value + "' is not a valid " + fieldType + " for " + fieldName + " using " + LookAndFeelProperties.getInstance(ContainerManager.getRoot()).getDateParsingMode().getDisplayString(); + return "'" + value + "' is not a valid " + fieldType + " for '" + fieldName + "' using " + LookAndFeelProperties.getInstance(ContainerManager.getRoot()).getDateParsingMode().getDisplayString(); return "Could not convert value '" + value + "' (" + value.getClass().getSimpleName() + ") for " + fieldType + " field '" + fieldName + "'" ; } diff --git a/study/test/src/org/labkey/test/tests/study/AssayTest.java b/study/test/src/org/labkey/test/tests/study/AssayTest.java index b455a46c0a7..ef89275eb02 100644 --- a/study/test/src/org/labkey/test/tests/study/AssayTest.java +++ b/study/test/src/org/labkey/test/tests/study/AssayTest.java @@ -393,7 +393,7 @@ private void uploadRuns(String folder, String asUser) assertTextPresent( "Could not convert value 'Bad Test' (String) for Double field '" + TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 1) + "'.", "Could not convert value 'Bad Test' (String) for Integer field '" + TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 2) + "'.", - "'Bad Test' is not a valid Date for " + TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 3) + " using U.S. date parsing (MDY)."); + "'Bad Test' is not a valid Date for '" + TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 3) + "' using U.S. date parsing (MDY)."); setFormElement(Locator.name(TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 1)), TEST_ASSAY_SET_PROPERTIES[1]); setFormElement(Locator.name(TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 2)), TEST_ASSAY_SET_PROPERTIES[2]); setFormElement(Locator.name(TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 3)), TEST_ASSAY_SET_PROPERTIES[3]); diff --git a/study/test/src/org/labkey/test/tests/study/LinkAssayToStudyTest.java b/study/test/src/org/labkey/test/tests/study/LinkAssayToStudyTest.java index 5739c5813d7..03dba8fb0f6 100644 --- a/study/test/src/org/labkey/test/tests/study/LinkAssayToStudyTest.java +++ b/study/test/src/org/labkey/test/tests/study/LinkAssayToStudyTest.java @@ -158,7 +158,7 @@ private void uploadRuns(String folder, String asUser) assertTextPresent( "Could not convert value 'Bad Test' (String) for Double field '" + TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 1) + "'.", "Could not convert value 'Bad Test' (String) for Integer field '" + TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 2) + "'.", - "'Bad Test' is not a valid Date for " + TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 3) + " using U.S. date parsing (MDY)."); + "'Bad Test' is not a valid Date for '" + TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 3) + "' using U.S. date parsing (MDY)."); setFormElement(Locator.name(TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 1)), TEST_ASSAY_SET_PROPERTIES[1]); setFormElement(Locator.name(TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 2)), TEST_ASSAY_SET_PROPERTIES[2]); setFormElement(Locator.name(TEST_ASSAY_SET_PROP_NAME + (TEST_ASSAY_SET_PREDEFINED_PROP_COUNT + 3)), TEST_ASSAY_SET_PROPERTIES[3]);