Skip to content

[BI-1629] Add filtering to Ontology Table#243

Merged
dmeidlin merged 2 commits intodevelopfrom
feature/BI-1629
Mar 10, 2023
Merged

[BI-1629] Add filtering to Ontology Table#243
dmeidlin merged 2 commits intodevelopfrom
feature/BI-1629

Conversation

@dmeidlin
Copy link
Contributor

@dmeidlin dmeidlin commented Mar 3, 2023

Description

Story: BI-1629

TraitsQuery#constructSearchRequest was created and called in the GET /traits controller of TraitsController.
The query params and search request are then passed to the same ResponseUtils method used by POST /traits for returning filtered traits.

Dependencies

none

Testing

call GET /traits?<field>=<value> using a searchable field for traits and verify only filtered traits returned.

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>

@dmeidlin dmeidlin requested review from a team, davedrp and timparsons and removed request for a team March 3, 2023 18:33
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.

Code looks good, but had one issue when I was testing from the UI

Comment on lines +76 to +82
if (!StringUtils.isBlank(getMethodDescription())) {
filters.add(constructFilterRequest("methodDescription", getMethodDescription()));
}
if (!StringUtils.isBlank(getMethodClass())) {
filters.add(constructFilterRequest("methodClass", getMethodClass()));
}
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 these two fields need to be combined together for filtering purposes because the UI combines them together for display purposes. When I tried filtering by that column, the filter only applies to the method description.

Example UI filtering: on the UI the "Method" column shows "test Measurement". If I type in "test" as my filter, then the ontology term shows correctly, however, if I type "Measurement", the term does not show in the table.

@dmeidlin dmeidlin merged commit d4543f2 into develop Mar 10, 2023
@dmeidlin dmeidlin deleted the feature/BI-1629 branch March 10, 2023 20:38
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