From 589390c845fdbf86f3dda91ac0fb4ec0f3b45ded Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Tue, 23 Jun 2026 14:55:10 -0700 Subject: [PATCH 1/3] GH Issue 594: Update messaging related to parent samples/sources not found during import --- experiment/src/org/labkey/experiment/ExpDataIterators.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/experiment/src/org/labkey/experiment/ExpDataIterators.java b/experiment/src/org/labkey/experiment/ExpDataIterators.java index 1d7707ed0a1..958c9b09189 100644 --- a/experiment/src/org/labkey/experiment/ExpDataIterators.java +++ b/experiment/src/org/labkey/experiment/ExpDataIterators.java @@ -1933,7 +1933,7 @@ else if (aliasPrefix != null && aliasSuffix != null) if (sample != null) parentMaterials.put(sample, sampleRole(sample)); else - throw new ValidationException("Sample '" + entityName + "' not found in Sample Type '" + namePart + "'."); + throw new ValidationException("Parent sample '" + entityName + "' from Sample Type '" + namePart + "' not found in the current context."); } } @@ -2002,7 +2002,7 @@ else if (DATA_INPUT_PARENT.equalsIgnoreCase(aliasPrefix)) { if (ExpSchema.DataClassCategoryType.sources.name().equalsIgnoreCase(dataClass.getCategory())) - throw new ValidationException("Source '" + entityName + "' not found in Source Type '" + namePart + "'."); + throw new ValidationException("Source '" + entityName + "' from Source Type '" + namePart + "' not found in the current context."); else throw new ValidationException("Data input '" + entityName + "' not found in Data Class '" + namePart + "'."); } From dcf1fe0ef1ff14d4b025551ffe5f080779ac41c1 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Tue, 23 Jun 2026 15:42:08 -0700 Subject: [PATCH 2/3] Remove extra space and update non-source messaging to match --- experiment/src/org/labkey/experiment/ExpDataIterators.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/experiment/src/org/labkey/experiment/ExpDataIterators.java b/experiment/src/org/labkey/experiment/ExpDataIterators.java index 958c9b09189..841ce6bf8d2 100644 --- a/experiment/src/org/labkey/experiment/ExpDataIterators.java +++ b/experiment/src/org/labkey/experiment/ExpDataIterators.java @@ -2002,9 +2002,9 @@ else if (DATA_INPUT_PARENT.equalsIgnoreCase(aliasPrefix)) { if (ExpSchema.DataClassCategoryType.sources.name().equalsIgnoreCase(dataClass.getCategory())) - throw new ValidationException("Source '" + entityName + "' from Source Type '" + namePart + "' not found in the current context."); + throw new ValidationException("Source '" + entityName + "' from Source Type '" + namePart + "' not found in the current context."); else - throw new ValidationException("Data input '" + entityName + "' not found in Data Class '" + namePart + "'."); + throw new ValidationException("Data input '" + entityName + "' from Data Class '" + namePart + "' not found in the current context."); } } } From 2a54f7f59068bcdfcd3108466d323e5c6504c2ce Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 24 Jun 2026 06:57:41 -0700 Subject: [PATCH 3/3] Update test expectations --- experiment/src/client/test/integration/utils.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/experiment/src/client/test/integration/utils.ts b/experiment/src/client/test/integration/utils.ts index 290dcbdb6dd..bd0f4e50650 100644 --- a/experiment/src/client/test/integration/utils.ts +++ b/experiment/src/client/test/integration/utils.ts @@ -732,7 +732,10 @@ export async function verifyRequiredLineageInsertUpdate(server: IntegrationTestS failedImportResp = await ExperimentCRUDUtils.importData(server, 'name\t' + parentInput + '\nCData3\t', dataType, 'IMPORT', topFolderOptions, editorUserOptions, false, false, isChildSample, true); expect(JSON.parse(failedImportResp.text).exception).toBe('Missing value for required property: ' + parentInput); failedImportResp = await ExperimentCRUDUtils.importData(server, 'name\t' + parentInput + '\nCData3\tbadparentname', dataType, 'IMPORT', topFolderOptions, editorUserOptions, false, false, isChildSample, true); - expect(JSON.parse(failedImportResp.text).exception).toContain("'badparentname' not found in"); + if (isParentSample) + expect(JSON.parse(failedImportResp.text).exception).toContain("Parent sample 'badparentname' from Sample Type '" + parentDataType + "' not found in the current context."); + else + expect(JSON.parse(failedImportResp.text).exception).toContain("Data input 'badparentname' from Data Class '" + parentDataType + "' not found in the current context."); failedImportResp = await ExperimentCRUDUtils.importData(server, 'name\tpAlias\nCData3\t', dataType, 'IMPORT', topFolderOptions, editorUserOptions, false, false, isChildSample, true); expect(JSON.parse(failedImportResp.text).exception).toBe('Missing value for required property: pAlias'); failedImportResp = await ExperimentCRUDUtils.importData(server, 'name\nCData3', dataType, 'MERGE', topFolderOptions, editorUserOptions, false, false, isChildSample, true); @@ -942,4 +945,4 @@ export function generateFieldNameForImport(length: number = 10, charset?: string fieldName = generateFieldName(length, charset); } return fieldName; -} \ No newline at end of file +}