Conversation
| List<BrAPIObservationUnit> datasetOUs = ouDAO.getObservationUnitsForDataset(datasetId.toString(), program); | ||
|
|
||
| //Add years to the addition_info elements | ||
| Map<String, Integer> studyDbId2Year = new HashMap<>(); // used to prevent the same study from being fetched repeatedly. |
There was a problem hiding this comment.
Maybe we should create a card to cache seasons in redis, I think this has come up elsewhere in the experiment processor as well. It looks like some of the study dao methods use the program cache but the one used here doesn't so makes sense for now but maybe in the future we could look at utilizing the redis cache.
There was a problem hiding this comment.
I created the story BI-2126 Cache seasons in redis.
The Code is now using getStudyByEnvironmentId() to fetch the Study from cache.
|
Tested and working |
| List<BrAPIObservationUnit> datasetOUs = ouDAO.getObservationUnitsForDataset(datasetId.toString(), program); | ||
|
|
||
| //Add years to the addition_info elements | ||
| Map<String, Integer> studyDbId2Year = new HashMap<>(); // used to prevent the same study from being fetched repeatedly. |
There was a problem hiding this comment.
I think the naming of studyDbId2Year could be more clear, for example yearByStudyDbId would indicate that you can use the map to look up a year by a studyDbId and would also have parallelism with other maps in bi-api that are named {value}By{key}.
There was a problem hiding this comment.
Done (and thank you)
Description
BI-2126 Env year missing from dataset view
Now the Env Year is fetched on the back-end and passed to the front-end in the additional_Info element of each Observation Unit.
Dependencies
bi-api: bug/BI-2126 branch
Testing
EXPECTED RESULT
Checklist: