From b2200f50856be37f72e80d92880515800f5ae4ad Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 22 Dec 2025 11:24:04 -0800 Subject: [PATCH 1/2] Handle multiple special chars in plate based assay measure field --- .../assay/plate/AssayPlateMetadataServiceImpl.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/assay/src/org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java b/assay/src/org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java index ea2c98c3414..81ace05cfb3 100644 --- a/assay/src/org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java +++ b/assay/src/org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java @@ -96,7 +96,6 @@ import org.labkey.api.util.logging.LogHelper; import org.labkey.api.view.ActionURL; import org.labkey.assay.TSVProtocolSchema; -import org.labkey.assay.plate.data.WellData; import org.labkey.assay.plate.model.WellBean; import org.labkey.assay.plate.query.PlateSchema; import org.labkey.assay.plate.query.PlateTable; @@ -706,13 +705,13 @@ public PlateGridInfo(PlateUtils.GridInfo info, PlateSet plateSet, Set me private @Nullable String getPrefixedValue(String annotation, String prefix) { - if (annotation != null && annotation.trim().toLowerCase().startsWith(prefix)) + if (annotation != null && annotation.trim().toLowerCase().startsWith(prefix + ":")) { - String[] parts = annotation.split(":"); - if (parts.length > 1) + // Issue 52782: measure name may contain a colon + String[] parts = annotation.split(":", 2); + if (parts.length == 2) { - // Issue 52782: measure name may contain a colon, so we need to join the rest of the parts - return StringUtils.join(parts, ":", 1, parts.length).trim(); + return parts[1].trim(); } } return null; From 4886dc689dde9af18e373a16602370e50edf8a9e Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Tue, 23 Dec 2025 10:31:23 -0800 Subject: [PATCH 2/2] handle spaces around colon in annotation --- .../org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assay/src/org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java b/assay/src/org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java index 81ace05cfb3..b4d7635f972 100644 --- a/assay/src/org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java +++ b/assay/src/org/labkey/assay/plate/AssayPlateMetadataServiceImpl.java @@ -705,11 +705,11 @@ public PlateGridInfo(PlateUtils.GridInfo info, PlateSet plateSet, Set me private @Nullable String getPrefixedValue(String annotation, String prefix) { - if (annotation != null && annotation.trim().toLowerCase().startsWith(prefix + ":")) + if (annotation != null) { // Issue 52782: measure name may contain a colon String[] parts = annotation.split(":", 2); - if (parts.length == 2) + if (parts.length == 2 && parts[0].trim().equalsIgnoreCase(prefix)) { return parts[1].trim(); }