Issue 52098, 49422: when looking up by alternate keys do that first so number names will resolve well#2455
Merged
labkey-susanh merged 12 commits intodevelopfrom May 26, 2025
Merged
Conversation
…w for alternate key (for trigger scripts?)
labkey-danield
approved these changes
May 20, 2025
labkey-tchad
approved these changes
May 21, 2025
Member
labkey-tchad
left a comment
There was a problem hiding this comment.
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(); | ||
| } |
Member
There was a problem hiding this comment.
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(); | |
| } |
Comment on lines
+1847
to
+1849
| .addField(baseLookupFieldName) | ||
| .setType(ColumnType.Lookup) | ||
| .setLookup(new FieldDefinition.IntLookup("lists", lookupListName)); |
Member
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
Thanks. Done.
don't show required validation error after conversion error for the same field
labkey-susanh
commented
May 22, 2025
Contributor
Author
labkey-susanh
left a comment
There was a problem hiding this comment.
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)); |
Contributor
Author
There was a problem hiding this comment.
Thanks. Done.
Comment on lines
+2012
to
+2017
| private void resetList() | ||
| { | ||
| DataRegionTable dataRegionTable = new DataRegionTable("query", getDriver()); | ||
| dataRegionTable.checkAllOnPage(); | ||
| dataRegionTable.deleteSelectedRows(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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