Skip to content

[BI-2923] Associate observation variables with brapi program db id on creation - #571

Open
jloux-brapi wants to merge 1 commit into
epic/BI-2862from
feature/BI-2923
Open

jloux-brapi wants to merge 1 commit into
epic/BI-2862from
feature/BI-2923

Conversation

@jloux-brapi

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

Copy link
Copy Markdown
Collaborator

Description

Story: BI-2923

  • On creation of BrAPI Observation Variables for traits they are now associated with the brapi program
  • The general fetch used by the cache now retrieves observation variables by program instead of exref.

Dependencies

Testing

  • Create New Ontology terms in DeltaBreed, verify the terms are created and show up on the Ontology Page
  • Update ontology terms in DeltaBreed. This can be achieved by clicking Show Details and then clicking Edit, where if they are not already used you can edit some elements of the term. Activating and Deactivating also updates ontology. Simplify verify the changes are reflected once they are made.

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

// Get brapi variables
VariableQueryParams variablesRequest = new VariableQueryParams();
variablesRequest.externalReferenceSource(referenceSource);
variablesRequest.programDbId(brapiProgramDbId);

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.

since traits are now fetched only by programDbId, any variable with a NULL program_id will trigger the throw at line 211 for the whole program. The only way I can see that happening is if the ProdServer migration runs first and the old bi-api creates a trait before this version is deployed. Will these three PRs always be deployed together? If not, it might be worth falling back to the exref lookup for any trait IDs missing from the result.

This branch has not been deployed

No deployments
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