Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Incorrect nesting of adult human in the development stage filter #7394

Open
MillenniumFalconMechanic opened this issue Nov 22, 2024 · 0 comments
Labels
bug Someone made a missteak...

Comments

@MillenniumFalconMechanic
Copy link
Collaborator

MillenniumFalconMechanic commented Nov 22, 2024

Describe the bug

In the development stage filter, Adult (15+ years) should be a child of Postnatal human and not a sibling. See correct hierarchy in OLS. Originally reported by @jahilton in Slack.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Collections.
  2. Click on Pediatric (0-15 years) in the development stage filter.
  3. Collections with Pediatric (0-15 years) and Adult (15+ years) development stages are included in the filtered result set.

Expected behavior

Only collections with Pediatric (0-15 years) are included in the filtered result set.

Root Cause

  • The backend tags each collection with their ancestors; a collection with Adult (15+ years) will have an ancestor of Postnatal human.
  • The frontend development stage filter configuration defines Pediatric (0-15 years) as the only child of Postnatal human. When Pediatric (0-15 years) is selected, the frontend "rolls up" the selected value to Postnatal human. This means the collections tagged with the Postnatal human ancestor are included in the filtered result set.

Fix

Update development stage config: the adult definition needs to be moved into postnatal's children array (as the second element).

@MillenniumFalconMechanic MillenniumFalconMechanic added the bug Someone made a missteak... label Nov 22, 2024
@MillenniumFalconMechanic MillenniumFalconMechanic changed the title BUG: Incorrect nesting of postnatal human development stages BUG: Incorrect nesting of postnatal human in the development stage filter Nov 22, 2024
@MillenniumFalconMechanic MillenniumFalconMechanic changed the title BUG: Incorrect nesting of postnatal human in the development stage filter BUG: Incorrect nesting of adult human in the development stage filter Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Someone made a missteak...
Projects
None yet
Development

No branches or pull requests

1 participant