Skip to content

BI-2918: Study Cache 1 - Replace programCache.get() dependencies with direct BrAPI calls - #541

Merged
jloux-brapi merged 2 commits into
epic/BI-2862from
feature/BI-2918
Aug 26, 2026
Merged

BI-2918: Study Cache 1 - Replace programCache.get() dependencies with direct BrAPI calls#541
jloux-brapi merged 2 commits into
epic/BI-2862from
feature/BI-2918

Conversation

@humsika

@humsika humsika commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

Story: BI-2918

Updated BrAPIStudyDAO so Study read paths no longer depend on programCache.get(). The affected methods now retrieve Study data directly from BrAPI using the BrAPI client / DAO utility pattern, similar to the existing cache-removal approach used in BrAPIObservationUnitDAO and Trial DAO.

Main changes:

  • Replaced Study cache reads in getStudies(...).
  • Replaced Study cache reads in getStudiesByEnvironmentIds(...).
  • Preserved existing Study ID behavior by filtering with the BI Study external reference.
  • Added/updated unit tests to verify direct BrAPI reads are used instead of programCache.get().

Dependencies

Testing

Unit testing:

  • Added/updated BrAPIStudyDAOUnitTest.
  • Verified Study reads call brAPIDAOUtil.get(...).
  • Verified programCache.get(...) is not called.
  • Verified Study lookup by environment ID still filters using the BI Study external reference.
  • Verified empty BrAPI results return an empty Study list.

Manual testing:

  • Verified Experiments tab loads Study/environment data.
  • Verified Env, Env Location, and Env Year continue to display correctly.
  • Verified new experiment import flow.
  • Downloaded an experiment and verified the environment information is still populated correctly, including environment name, environment location, and environment year.
  • Appended an observation variable to the top-level experiment dataset and confirmed the import completed successfully.
  • Created/used a sub-entity dataset, downloaded it, added a different ontology observation variable, appended it back, and confirmed the sub-entity append flow completed successfully.

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 created/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

@humsika
humsika requested review from a team and jloux-brapi and removed request for a team August 13, 2026 14:28
jloux-brapi
jloux-brapi approved these changes Aug 13, 2026
@jloux-brapi jloux-brapi added the on hold Review, but do not merge until removed label Aug 13, 2026
Base automatically changed from feature/BI-3004 to epic/BI-2862 August 25, 2026 20:41
@jloux-brapi jloux-brapi removed the on hold Review, but do not merge until removed label Aug 25, 2026
@jloux-brapi
jloux-brapi merged commit 37d3f9c into epic/BI-2862 Aug 26, 2026
2 checks passed
@jloux-brapi
jloux-brapi deleted the feature/BI-2918 branch August 26, 2026 20:59
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