Skip to content

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

Open
humsika wants to merge 1 commit into
feature/BI-3004from
feature/BI-2918
Open

BI-2918: Study Cache 1 - Replace programCache.get() dependencies with direct BrAPI calls#541
humsika wants to merge 1 commit into
feature/BI-3004from
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature on hold Review, but do not merge until removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants