Skip to content

[BI-1088] Germplasm List Download#143

Merged
HMS17 merged 18 commits intodevelopfrom
feature/BI-1088
Feb 15, 2022
Merged

[BI-1088] Germplasm List Download#143
HMS17 merged 18 commits intodevelopfrom
feature/BI-1088

Conversation

@HMS17
Copy link
Contributor

@HMS17 HMS17 commented Jan 28, 2022

Description

Story: BI-1088 - Germplasm List Export File

  • Enabled export of data as xlsx file by adding ExcelWriter.
  • Enabled export of Germplasm List data
  • Added "/programs/{programId}/germplasm/lists/{listDbId}/export" endpoint to call export of Germplasm List data
  • Added exportGermplasmList to BrAPIGermplasmService.java to retrieve Germplasm List and Germplasm data and convert it into a format that could be used by ExcelWriter
  • Added helper method removeAppendedKey to BrAPIGermplasmService to remove key appended to the Germplasm List name
  • Added Column model to represent columns for aid in file export
  • Added Pedigree model to aid in parsing pedigree information on backend
  • Added GermplasmFileColumns to represent columns in Germplasm File for aid in export
  • Added getListById in BrAPIListDAO.java and getGermplasmByName in BrAPIGermplasmDAO.java to retrieve relevant data from database

Dependencies

bi-web/BI-1088

Testing

see testing for bi-web/BI-1088

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: <link to TAF run>

@HMS17 HMS17 marked this pull request as ready for review February 7, 2022 21:42
@HMS17 HMS17 requested review from a team, davedrp and timparsons and removed request for a team February 7, 2022 21:42
@HMS17 HMS17 requested review from a team and dmeidlin and removed request for a team and timparsons February 7, 2022 22:28
@HMS17 HMS17 assigned davedrp and unassigned timparsons Feb 7, 2022
Comment on lines +49 to +50
BrAPIListSearchRequest listSearch = new BrAPIListSearchRequest();
listSearch.addListDbIdsItem(listId);
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like listSearch isn't used and can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Removed.

Copy link
Contributor

@davedrp davedrp left a comment

Choose a reason for hiding this comment

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

First failed Test

STEPS

  1. uploaded Missing_1_male_eNo.xls (row 3 has a Female Parent Entry No but no Male Parent Entry No)
    NOTE: Shawn says that having only a female parent is valid. She says:

If germplasm is cloned, the parent is considered the mother (even if it gender of the individual is hermaphroditic or male)

2)Tried to download the data.

OUTCOME:
A new browser tab was open with the message:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

EXPECTED
A) the download list xsl
-also -
B) If there is an error, then a more user-friendly error message.

@davedrp
Copy link
Contributor

davedrp commented Feb 10, 2022

Second failed Test

STEPS

  1. uploaded pedigree_by_GID_small.xls(has Female Parent GID and Male Parent GID)

2)Tried to download the data.

OUTCOME:
A new browser tab was open with the message:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

EXPECTED
A) the download list xsl

@HMS17 HMS17 requested a review from davedrp February 15, 2022 16:09
@HMS17
Copy link
Contributor Author

HMS17 commented Feb 15, 2022

Second failed Test

STEPS

  1. uploaded pedigree_by_GID_small.xls(has Female Parent GID and Male Parent GID)

2)Tried to download the data.

OUTCOME: A new browser tab was open with the message: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

EXPECTED A) the download list xsl

Tests should be passing now

…into feature/BI-1088

� Conflicts:
�	src/main/java/org/breedinginsight/brapps/importer/model/imports/germplasm/GermplasmImportService.java
�	src/main/java/org/breedinginsight/brapps/importer/services/processors/ProcessorManager.java
@HMS17 HMS17 merged commit ff3f256 into develop Feb 15, 2022
@HMS17 HMS17 deleted the feature/BI-1088 branch February 15, 2022 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants