Skip to content

Untangle/Hack Pedigree UUID scheme so links work on fe - #553

Merged
jloux-brapi merged 8 commits into
epic/BI-2862from
feature/BI-2904
Oct 6, 2026
Merged

jloux-brapi merged 8 commits into
epic/BI-2862from
feature/BI-2904

Conversation

@jloux-brapi

@jloux-brapi jloux-brapi commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Story: BI-2904

  • Untangled/made a hack to modify germplasm.additionalInfo.male/femaleGermplasmUUID to convert bi-generated ids to the eventually saved brapi germplasmDbIds. This issue was causing links of female/parent Germplasm data table rows to throw and error when clicked, because these IDs are being looked up as brapi germplasmDbIds with the set of changes from feature/BI-2902. This is a rather messy/hacky fix I am using as a stop-gap until we decide to import pedigree after germplasm records are created. A comment explaining this situation has been provided in the code.
  • Added some comments for improvements/edits that will need to be made for the brapi endpoints, linking associated tickets.

Dependencies

epic/BI-2862 branch of brapi-java-prodserver
feature/BI-2905 branch of bi-web

Testing

Full regression for most germplasm features, excluding sample importing, which will be dealt with once develop bi-api code is merged and this ticket

This features include:

  • Importing Germplasm with various use cases, including parent lookups via existing germplasm lookups or via-entry numbers
  • Downloading imported germplasm
  • Viewing imported germplasm in the Germplasm tab, and clicking all associated links in the rows including the GID, both parent links, and Show Details
  • Clicking on existing Germplasm brings up the Pedigree Viewer, where you can click on other germplasm in the hierarchy tree. These should load without error. NOTE: A production bug was discovered clicking back in these scenarios, these changes did not cause this issue)

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

…plement stopgap hack

Unit tests made me aware of the use case where rows in a gemrplasm import can reference other rows
in the import as parents, and when this happens, no germplasmDbId will be created until the germplasm is fully imported
because of the way the import is organized.

Until we manage to change this, I've created a stop-gap which will mutate this additional info on the fly from the bi-generated exrefs
to the brapiGermplasmDbIds in the BrAPIGermplasmDAO.processGermplasmForDisplay method.

This will lookup the germplasmDbIds of the pedigree nodes using the exrefs, and will mutate the additional info records for male/female IDs
so that the links still work as expected in the frontend UI
@jloux-brapi jloux-brapi changed the title Add comments to fix during BrAPI endpoint fixing Untangle/Hack Pedigree UUID scheme so links work on fe Sep 4, 2026
@jloux-brapi
jloux-brapi requested a review from humsika September 4, 2026 19:35
@jloux-brapi
jloux-brapi marked this pull request as ready for review September 4, 2026 19:35
Comment thread src/main/java/org/breedinginsight/brapi/v2/dao/BrAPIGermplasmDAO.java Outdated

@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 and also validated the changes manually and is working as expected.

@humsika humsika added the on hold Review, but do not merge until removed label Sep 14, 2026
Base automatically changed from feature/BI-2902 to epic/BI-2862 October 6, 2026 20:02
@jloux-brapi jloux-brapi removed the on hold Review, but do not merge until removed label Oct 6, 2026
@jloux-brapi
jloux-brapi merged commit 878392e into epic/BI-2862 Oct 6, 2026
1 check failed
@jloux-brapi
jloux-brapi deleted the feature/BI-2904 branch October 6, 2026 20:07
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.

2 participants