From 5e5b060f727eb6ba7aaddf1caaaf65646bd47d47 Mon Sep 17 00:00:00 2001 From: XingY Date: Tue, 21 Apr 2026 20:37:40 -0700 Subject: [PATCH 1/2] GitHub Issue 1082: Server exception "Badly formatted list of strings" on assay run import with invalid MVTC field value --- .../api/assay/AbstractAssayTsvDataHandler.java | 13 +++++++++++-- .../integration/AssayImportRunAction.ispec.ts | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/api/src/org/labkey/api/assay/AbstractAssayTsvDataHandler.java b/api/src/org/labkey/api/assay/AbstractAssayTsvDataHandler.java index 7060ae26d9e..9fa5dac7d8a 100644 --- a/api/src/org/labkey/api/assay/AbstractAssayTsvDataHandler.java +++ b/api/src/org/labkey/api/assay/AbstractAssayTsvDataHandler.java @@ -866,8 +866,17 @@ else if (entry.getKey().equalsIgnoreCase(ProvenanceService.PROVENANCE_INPUT_PROP Object o = map.get(pd.getName()); if (PropertyType.MULTI_CHOICE == pd.getPropertyType()) { - o = MultiChoice.Converter.getInstance().convert(MultiChoice.Array.class, o); - map.put(pd.getName(), o); + try + { + // GitHub Issue 1082: Server exception "Badly formatted list of strings" on assay run import with invalid MVTC field value + o = MultiChoice.Converter.getInstance().convert(MultiChoice.Array.class, o); + map.put(pd.getName(), o); + } + catch (ConversionException e) + { + errors.add(new PropertyValidationError(e.getMessage(), pd.getName())); + } + } else if (o instanceof String) { diff --git a/experiment/src/client/test/integration/AssayImportRunAction.ispec.ts b/experiment/src/client/test/integration/AssayImportRunAction.ispec.ts index 59b6923397c..f20256fc5d2 100644 --- a/experiment/src/client/test/integration/AssayImportRunAction.ispec.ts +++ b/experiment/src/client/test/integration/AssayImportRunAction.ispec.ts @@ -717,6 +717,23 @@ describe('assay-importRun.api', () => { expect(response.text).toContain('One or more values cannot be removed from the multi-choice list'); }); + // GitHub Issue 1082: Server exception "Badly formatted list of strings" on assay run import with invalid MVTC field value + it('blocks deleting in-use multi-choice value used as part of an array value', async () => { + if (!supportMultiChoice) { + return; + } + + const { topFolderOptions } = context; + + // Import a run with ['Abnormal', 'cDNA'] as multi-choice values + const importPayload: ImportRunOptions = { + assayId: ASSAY_A_ID, + dataRows: [{ [RESULT_MVTC_FIELD_NAME]: ['""x,y""'] }], + }; + const importResponse = await importRunToServer(server, importPayload, topFolderOptions); + expect(importResponse.body.exception).toContain('for field \'' + RESULT_MVTC_FIELD_NAME + '\' is invalid.'); + }); + // GitHub Issue 925: Not providing a MVTC value in an assay result throws error it('errors when required MVTC column not provided in assay import', async () => { if (!supportMultiChoice) { From ca8b96d32812c1377db8729c8802bb9e84a6af72 Mon Sep 17 00:00:00 2001 From: XingY Date: Wed, 22 Apr 2026 10:58:43 -0700 Subject: [PATCH 2/2] fix comment --- .../src/client/test/integration/AssayImportRunAction.ispec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiment/src/client/test/integration/AssayImportRunAction.ispec.ts b/experiment/src/client/test/integration/AssayImportRunAction.ispec.ts index f20256fc5d2..a240785336a 100644 --- a/experiment/src/client/test/integration/AssayImportRunAction.ispec.ts +++ b/experiment/src/client/test/integration/AssayImportRunAction.ispec.ts @@ -718,7 +718,7 @@ describe('assay-importRun.api', () => { }); // GitHub Issue 1082: Server exception "Badly formatted list of strings" on assay run import with invalid MVTC field value - it('blocks deleting in-use multi-choice value used as part of an array value', async () => { + it('illegal tsv string', async () => { if (!supportMultiChoice) { return; }