Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions experiment/src/client/test/integration/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -942,4 +945,4 @@ export function generateFieldNameForImport(length: number = 10, charset?: string
fieldName = generateFieldName(length, charset);
}
return fieldName;
}
}
6 changes: 3 additions & 3 deletions experiment/src/org/labkey/experiment/ExpDataIterators.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.");

}
}
Expand Down Expand Up @@ -2002,9 +2002,9 @@ 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 + "'.");
throw new ValidationException("Data input '" + entityName + "' from Data Class '" + namePart + "' not found in the current context.");
}
}
}
Expand Down