-
Notifications
You must be signed in to change notification settings - Fork 1
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
[BI-1606] Allow germplasm records to be in multiple lists #298
Conversation
@@ -119,6 +121,9 @@ export default class GermplasmByList extends GermplasmBase { | |||
const {result: {data: lists}} = await GermplasmDAO.getAllLists(this.activeProgram!.id!, paginationQuery); | |||
const matchingLists: any[] = lists.filter(list => list.listDbId === this.$route.params.listId); | |||
this.list = matchingLists[0]; | |||
this.referenceId = matchingLists[0].externalReferences.reduce((result: string, ref: any) => { | |||
return ref.referenceSource == "breeding-insight.net/lists" ? ref.referenceID : result; |
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.
the reference source root (aka breeding-insight.net
in this line of code) is an environment variable: VUE_APP_BI_REFERENCE_SOURCE
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.
Code looks good, but when I was testing, sorting by entry number was not working correctly
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.
Working as expected!
127da90
to
aeee15d
Compare
Description
Story: BI-1606
The germplasm list details page now uses a helper function to display the entry number whether the number is stored using the old format of importEntryNumber or using the listEntryNumbers map.
Dependencies
bi-api feature/BI-1606 branch
Testing
Import germplasm with user-supplied entry numbers.
Go to the Germpasm Lists tab and use the dev tools console to inspect the list object in the response and verify there is an external reference entry for /lists and note the UUID stored as the refernceID.
Then view all imported germplasm and use the dev tools console to inspect the germplasm objects in the response from bi-api. Verify the additionalInfo field "listEntryNumbers" exists and the value is a Map with the imported list ID from step 2 as the key and entry number as value.
Import germplasm without user-supplied entry numbers and repeat process above.
Download the imported germplasm and verify the exported file records match what is stored.
Download a list of previously imported germplasm that store entry number values in additionalInfo.imortEntryNumber and verify the exported file records match what is stored.
Checklist: