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

BugFix: Common Name Parsing #246

Merged
merged 3 commits into from
Jun 25, 2024
Merged

BugFix: Common Name Parsing #246

merged 3 commits into from
Jun 25, 2024

Conversation

NickPhura
Copy link
Collaborator

@NickPhura NickPhura commented Jun 25, 2024

Links to Jira Tickets

n/a

Description of Changes

Rename itis-sort.ts to itis-utils.ts
Add shared util function for parsing common names: correctly handles case where commonNames field is missing from itis response. Updated itis response interface to mark commonNames as optional.

Testing Notes

BioHub taxon endpoints return taxon records as expected, with an emphasis on the commonNames portion containing the expected values.

In SIMS, when adding a taxon to a survey that has no common names (like a higher rank taxon), when you go to edit the survey, the taxon should correctly be returned and show up in the UI. Before this fix, taxons with no common names were not returned at all from one of the biohub taxon endpoints.

Copy link

codecov bot commented Jun 25, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.71%. Comparing base (c8527c0) to head (be33590).

Files Patch % Lines
api/src/services/taxonomy-service.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #246      +/-   ##
==========================================
+ Coverage   68.64%   68.71%   +0.06%     
==========================================
  Files         194      194              
  Lines        4794     4794              
  Branches      637      637              
==========================================
+ Hits         3291     3294       +3     
+ Misses       1369     1368       -1     
+ Partials      134      132       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@NickPhura NickPhura requested review from mauberti-bc and MacQSL June 25, 2024 16:58
api/src/utils/itis-utils.ts Outdated Show resolved Hide resolved
Copy link

Copy link
Collaborator

@MacQSL MacQSL left a comment

Choose a reason for hiding this comment

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

🐅

@NickPhura NickPhura merged commit f3bad73 into dev Jun 25, 2024
19 checks passed
@NickPhura NickPhura deleted the npTechDebt-itis-common-names branch June 25, 2024 21:35
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.

2 participants