Skip to content

BI-1616#237

Merged
nickpalladino merged 5 commits intodevelopfrom
feature/BI-1616
Jan 18, 2023
Merged

BI-1616#237
nickpalladino merged 5 commits intodevelopfrom
feature/BI-1616

Conversation

@nickpalladino
Copy link
Member

@nickpalladino nickpalladino commented Jan 10, 2023

Description

Story: https://breedinginsight.atlassian.net/browse/BI-1616?atlOrigin=eyJpIjoiMDY3MzAwZjNlNTM4NDQ4MzkwMmJhZDUzN2UxYjdmZWMiLCJwIjoiaiJ9

  • Added support for filtering on brapi lists endpoint

Dependencies

Testing

  • Test filtering, sorting and pagination in Germplasm Lists table to verify it's working as expected.

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 tested that my code works with both the brapi-java-server and BreedBase
  • 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: <please include a link to TAF run>

@nickpalladino nickpalladino requested review from a team, dmeidlin and timparsons and removed request for a team January 11, 2023 16:31
Copy link
Member

@timparsons timparsons left a comment

Choose a reason for hiding this comment

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

Left some comments about how to handle the listType query param

List<BrAPIListSummary> brapiLists;

if (queryParams.getListType() == null) {
// TODO: in future return all list types but for now just return germplasm
Copy link
Member

Choose a reason for hiding this comment

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

Why not just have this method return a 400 if the listType isn't specified?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't think the listType parameter was required but I can change it if it should be.

Copy link
Member

Choose a reason for hiding this comment

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

Ah...good point. Looked back at the spec, and you're spot on. I'll approve this!

Copy link
Member Author

Choose a reason for hiding this comment

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

cool thanks!

switch(queryParams.getListType()) {
case "germplasm":
default:
brapiLists = germplasmService.getGermplasmListsByProgramId(programId, request);
Copy link
Member

Choose a reason for hiding this comment

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

Similar to above, maybe a 400 should be returned here.

Copy link
Member Author

@nickpalladino nickpalladino Jan 11, 2023

Choose a reason for hiding this comment

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

I could see the case for a 400 here if there is a listType specified but it's not one of the available ones.

@nickpalladino nickpalladino merged commit 26c10be into develop Jan 18, 2023
@nickpalladino nickpalladino deleted the feature/BI-1616 branch January 18, 2023 19:34
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