diff --git a/experiment/src/client/test/integration/SampleTypeCrud.ispec.ts b/experiment/src/client/test/integration/SampleTypeCrud.ispec.ts
index fc216383297..b070697b182 100644
--- a/experiment/src/client/test/integration/SampleTypeCrud.ispec.ts
+++ b/experiment/src/client/test/integration/SampleTypeCrud.ispec.ts
@@ -1,4 +1,4 @@
-import { ExperimentCRUDUtils, hookServer, RequestOptions, successfulResponse } from '@labkey/test';
+import { ExperimentCRUDUtils, hookServer, RequestOptions, selectRandomN, successfulResponse } from '@labkey/test';
import mock from 'mock-fs';
import {
checkDomainName,
@@ -394,6 +394,7 @@ describe('Aliquot crud', () => {
const aliquotQueryCols = 'name, rowid, lsid, description, str, int, isAliquot, AliquotedFromLsid/name, rootmaterialrowid, Myparentcol, Myaliquotcol, Myindependentcol';
async function verifyImportingWithNameValue(parentSampleName: string, sampleType: string) {
+ console.log('Selected parentSampleName: ' + parentSampleName);
const parentInsertRow = {
name: parentSampleName,
description: 'testImportingWithNameValue parent'
@@ -559,14 +560,19 @@ describe('Aliquot crud', () => {
*
An aliquot with the name formatted as an aliquot (SAI_1-101).
* And have an aliquot w/o a name set.
* Validate that the names are as expected.
+ * Issue 53419: Aliquot parent with number like names that starts with leading zeroes aren't resolved during import
*
* Because importing is batched the imported aliquot without an explicit name set it should have the next
* index (default behavior).
*
*/
- it('testImportingWithNameValue - with naming patten', async () => {
+
+ const parentSampleName = ['S-1', '123', '0001', '0002', 'With Space', '+ -_.&)(:'];
+
+
+ it('(Fuzz Test) testImportingWithNameValue - with naming patten ', async () => {
// also include scenarios from testImportWithUpdate
- await verifyImportingWithNameValue('withNameValueParent', SAMPLE_ALIQUOT_IMPORT_TYPE_NAME);
+ await verifyImportingWithNameValue(selectRandomN(parentSampleName, 1)[0], SAMPLE_ALIQUOT_IMPORT_TYPE_NAME);
});
/**
@@ -583,8 +589,8 @@ describe('Aliquot crud', () => {
*
*
*/
- it('testImportingWithNameValue - without naming patten', async () => {
- await verifyImportingWithNameValue('withNameValueParentNoPattern', SAMPLE_ALIQUOT_IMPORT_NO_NAME_PATTERN_NAME);
+ it('(Fuzz Test) testImportingWithNameValue - without naming patten', async () => {
+ await verifyImportingWithNameValue(selectRandomN(parentSampleName, 1)[0], SAMPLE_ALIQUOT_IMPORT_NO_NAME_PATTERN_NAME);
});
async function verifyMultipleRootsAndAliquots(parentSampleName1: string, parentSampleName2: string, sampleType: string) {
diff --git a/experiment/src/org/labkey/experiment/controllers/exp/ExperimentController.java b/experiment/src/org/labkey/experiment/controllers/exp/ExperimentController.java
index 0086c905888..710cb334ff2 100644
--- a/experiment/src/org/labkey/experiment/controllers/exp/ExperimentController.java
+++ b/experiment/src/org/labkey/experiment/controllers/exp/ExperimentController.java
@@ -4413,6 +4413,9 @@ protected Map getRenamedColumns()
@Override
protected @Nullable Set getLineageImportAliases() throws IOException
{
+ Set aliases = new CaseInsensitiveHashSet();
+ // Issue 53419: Aliquot parent with number like names that starts with leading zeroes aren't resolved during import
+ aliases.add(ExpMaterial.ALIQUOTED_FROM_INPUT);
boolean crossTypeImport = getOptionParamValue(AbstractQueryImportAction.Params.crossTypeImport);
// Issue 51894: We need to stop conversion to numbers for alias fields for all type
// If there are aliases defined for one type that are number fields in another type, this will prevent
@@ -4421,18 +4424,15 @@ protected Map getRenamedColumns()
if (crossTypeImport)
{
List sampleTypes = SampleTypeServiceImpl.get().getSampleTypes(getContainer(), getUser(), true);
- Set aliases = new CaseInsensitiveHashSet();
for (ExpSampleTypeImpl sampleType : sampleTypes)
- {
aliases.addAll(sampleType.getImportAliases().keySet());
- }
- return aliases;
}
else
{
ExpSampleTypeImpl sampleType = SampleTypeServiceImpl.get().getSampleType(getContainer(), getUser(), _form.getQueryName());
- return new CaseInsensitiveHashSet(sampleType.getImportAliases().keySet());
+ aliases.addAll(sampleType.getImportAliases().keySet());
}
+ return aliases;
}
@Override