Skip to content

[BI-1720] - Export Multiple Environment Datasets as Zip#320

Merged
mlm483 merged 12 commits intodevelopfrom
feature/BI-1720
Jul 28, 2023
Merged

[BI-1720] - Export Multiple Environment Datasets as Zip#320
mlm483 merged 12 commits intodevelopfrom
feature/BI-1720

Conversation

@mlm483
Copy link
Contributor

@mlm483 mlm483 commented Jul 5, 2023

Description

Story: https://breedinginsight.atlassian.net/browse/BI-1720

The accompanying PR on bi-api: Breeding-Insight/bi-api#263.

The download modal for experiments now provides a checkbox for each environment in the experiment, in addition to the "All Environments" checkbox. Selecting the "All Environments" checkbox disables the individual environment checkboxes (their checked state is preserved).

If "All Environments" is selected, the environments query parameter is NOT sent, and all environments are expected in a single file. If one or more individual environment checkboxes are selected (and "All" is unselected), the environments query parameter is a comma-separated list of requested environmentIds, and each environment is expected to be in a separate file, zipped if more than one. See table below.

environments selection (UI): environments query param: expected output file:
"All Environments" not sent CSV/Excel with all environments
an individual environment contains 1 environmentId CSV/Excel with selected environment
multiple individual environments contains multiple environmentIds Zip containing CSV/Excel, one for each selected environment

I also did some cleanup:

  • removed unused Observation, Study and Trial components and routes.
  • removed TrialsAndStudiesBase, replaced usages with ProgramsBase which was identical.
  • improved (I hope) the usage of trialDbId vs. trialId in several places.
  • fixed BI-1853 - Program Key undefined in Vuex store.

Dependencies

Most of the changes for this feature are in the bi-api feature/BI-1720 branch.

Testing

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 tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: https://github.com/Breeding-Insight/taf/actions/runs/5592771430

@mlm483 mlm483 force-pushed the feature/BI-1720 branch from c719a75 to 295b7bf Compare July 5, 2023 19:20
@mlm483 mlm483 marked this pull request as ready for review July 5, 2023 19:22
@mlm483 mlm483 requested review from dmeidlin and timparsons July 5, 2023 20:19
export class StudyDAO {

static async getAllForTrial(programId: string, trialId: string): Promise<Result<Error, BiResponse>> {
static async getAllForTrial(programId: string, trialDbId: string): Promise<Result<Error, BiResponse>> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be changed to use the BI ID of the trial, not the trialDbId. This would mean setting the externalReferenceId instead of trialDbId in the request

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, afb70db. The externalReferenceId and externalReferenceSource are now sent as query parameters instead of trialDbId.

@mlm483 mlm483 requested a review from timparsons July 27, 2023 20:51
@mlm483 mlm483 merged commit 27787de into develop Jul 28, 2023
@mlm483 mlm483 deleted the feature/BI-1720 branch July 28, 2023 17:10
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.

3 participants