Skip to content

Conversation

@labkey-susanh
Copy link
Contributor

@labkey-susanh labkey-susanh commented May 19, 2025

Rationale

Issue 52098: Sample statuses with number labels may not resolve to the correct status
Issue 49422: List lookups with number-like values may not resolve to the correct status

Related Pull Requests

Changes

  • Add test case for Issue 49422
  • Convert a test field to a TextChoice field

Copy link
Member

@labkey-tchad labkey-tchad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider making a new test class for this and breaking it into multiple test cases. It doesn't seem to take advantage of the users or lists created by ListTest.

Comment on lines 2012 to 2017
private void resetList()
{
DataRegionTable dataRegionTable = new DataRegionTable("query", getDriver());
dataRegionTable.checkAllOnPage();
dataRegionTable.deleteSelectedRows();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider resetting list via api

Suggested change
private void resetList()
{
DataRegionTable dataRegionTable = new DataRegionTable("query", getDriver());
dataRegionTable.checkAllOnPage();
dataRegionTable.deleteSelectedRows();
}
private void truncateList(String listName) throws IOException, CommandException
{
new QueryApiHelper(createDefaultConnection(), getProjectName(), "lists", listName).truncateTable();
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines 1847 to 1849
.addField(baseLookupFieldName)
.setType(ColumnType.Lookup)
.setLookup(new FieldDefinition.IntLookup("lists", lookupListName));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding your question about ColumnType.Lookup being deprecated. setType(Lookup) isn't actually necessary; setLookup will set the type correctly.

Suggested change
.addField(baseLookupFieldName)
.setType(ColumnType.Lookup)
.setLookup(new FieldDefinition.IntLookup("lists", lookupListName));
.addField(baseLookupFieldName)
.setLookup(new FieldDefinition.IntLookup("lists", lookupListName));

Alternatively, you can pass a FieldDefinition to addField.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.

labkey-matthewb and others added 2 commits May 21, 2025 14:39
don't show required validation error after conversion error for the same field
Copy link
Contributor Author

@labkey-susanh labkey-susanh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to move to its own class. Done.

Comment on lines 1847 to 1849
.addField(baseLookupFieldName)
.setType(ColumnType.Lookup)
.setLookup(new FieldDefinition.IntLookup("lists", lookupListName));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.

Comment on lines 2012 to 2017
private void resetList()
{
DataRegionTable dataRegionTable = new DataRegionTable("query", getDriver());
dataRegionTable.checkAllOnPage();
dataRegionTable.deleteSelectedRows();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@labkey-susanh labkey-susanh merged commit a4df3b6 into develop May 26, 2025
6 checks passed
@labkey-susanh labkey-susanh deleted the fb_lookupResolutionType branch May 26, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants