Skip to content

[BI-3082] Implement sorting/filtering/pagination on germplasm list items - #567

Merged
jloux-brapi merged 4 commits into
epic/BI-2862from
feature/BI-3082
Oct 23, 2026
Merged

jloux-brapi merged 4 commits into
epic/BI-2862from
feature/BI-3082

Conversation

@jloux-brapi

@jloux-brapi jloux-brapi commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Story: BI-3082

  • Utilized new brapi-java-prodserver and brapi client/model changes to correctly sort/filter/paginate germplasm list items. This should resolve any issues with the previous implementation in the cache branch.

Dependencies

  • brapi-java-prod server (feature/BI-3082)
  • brapi client/model (feature/BI-3082)

Testing

Test sorting/filtering/pagination of the Germplasm List Details page.

This is the page once you click on Show Details on a germplasm list from the Lists tab.

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 create/modified unit and/or integration tests to cover this change or tests are not applicable
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth

li.getItem().putAdditionalInfoItem(BrAPIAdditionalInfoFields.GERMPLASM_LIST_ID, biGermplasmListId);
// listItem.position start of index is 0 in BrAPI, but in DeltaBreed, it starts at 1. increment result data to account for this.
// The actual sort/filter performs the search on a formula column created on the prod server, so no need to worry about that in the request above.
li.getItem().putAdditionalInfoItem(BrAPIAdditionalInfoFields.GERMPLASM_IMPORT_ENTRY_NUMBER, li.getListItem().getPosition() + 1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The entry number shown here is position + 1, but sort and filter on importEntryNumber still go to the ProdServer as importEntryNumber (GermplasmQuery lines 77 and 96). On the server, that’s the germplasm’s own additionalInfo.importEntryNumber, not listItemPosition.

bi-web’s GermplasmTable sorts by importEntryNumber by default, so the server’s position-based default sort is never used. For any list whose positions differ from the germplasm’s original import entry numbers (for example, germplasm reused from an earlier import), rows come back out of list order, and filtering by entry number matches the wrong rows.
For list searches, can we map importEntryNumber to listItemPosition?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

importEntryNumber was switched to listItemPosition and the default was changed in bi-web in feature/BI-3089.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so once bi-api BI-3089 and bi-web BI-3089 are merged this will be resolved right?

@humsika humsika left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code looks good to me.

@jloux-brapi
jloux-brapi merged commit 917a864 into epic/BI-2862 Oct 23, 2026
1 check failed
@jloux-brapi
jloux-brapi deleted the feature/BI-3082 branch October 23, 2026 21:37
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