Skip to content
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

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

dmeidlin
Copy link
Contributor

@dmeidlin dmeidlin commented Jan 26, 2023

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

  1. Import germplasm with user-supplied entry numbers.

  2. 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.

  3. 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.

  4. Import germplasm without user-supplied entry numbers and repeat process above.

  5. Download the imported germplasm and verify the exported file records match what is stored.

  6. 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:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: #136

@@ -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;
Copy link
Member

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

Copy link
Member

@timparsons timparsons left a 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

Copy link
Member

@timparsons timparsons left a comment

Choose a reason for hiding this comment

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

Working as expected!

@dmeidlin dmeidlin merged commit f65e980 into develop Feb 9, 2023
@dmeidlin dmeidlin deleted the feature/BI-1606 branch February 9, 2023 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants