-
Notifications
You must be signed in to change notification settings - Fork 9
Issue 52098, 49422: when looking up by alternate keys do that first so number names will resolve well #2455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…w for alternate key (for trigger scripts?)
labkey-tchad
left a comment
There was a problem hiding this 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.
| private void resetList() | ||
| { | ||
| DataRegionTable dataRegionTable = new DataRegionTable("query", getDriver()); | ||
| dataRegionTable.checkAllOnPage(); | ||
| dataRegionTable.deleteSelectedRows(); | ||
| } |
There was a problem hiding this comment.
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
| 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(); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| .addField(baseLookupFieldName) | ||
| .setType(ColumnType.Lookup) | ||
| .setLookup(new FieldDefinition.IntLookup("lists", lookupListName)); |
There was a problem hiding this comment.
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.
| .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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
don't show required validation error after conversion error for the same field
labkey-susanh
left a comment
There was a problem hiding this 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.
| .addField(baseLookupFieldName) | ||
| .setType(ColumnType.Lookup) | ||
| .setLookup(new FieldDefinition.IntLookup("lists", lookupListName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
| private void resetList() | ||
| { | ||
| DataRegionTable dataRegionTable = new DataRegionTable("query", getDriver()); | ||
| dataRegionTable.checkAllOnPage(); | ||
| dataRegionTable.deleteSelectedRows(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
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