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

fix: use normalized ids for untaxonomized ingredients and specific ingredients #7131

Merged
merged 5 commits into from
Jul 26, 2022

Conversation

stephanegigandet
Copy link
Contributor

In the ingredients structure of a product, there is an "id" field, which contains the canonical id of the ingredient. But if the ingredient does not exist in the taxonomy, it was prefixed with the language code but not normalized. So we had entries like "fr:Un ingrédient pas reconnu".

This changes it to a normalized string: "fr:un-ingredient-pas-reconnu".

A result is that is easier to match specific ingredients that are not in the taxonomy: fixes #7063

Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

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

LGTM


# Integration tests

perl integration/import_csv_file.t --update-expected-results
Copy link
Member

Choose a reason for hiding this comment

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

Good catch !

@sonarcloud
Copy link

sonarcloud bot commented Jul 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@stephanegigandet stephanegigandet merged commit d57cd90 into main Jul 26, 2022
@stephanegigandet stephanegigandet deleted the ingredients branch July 26, 2022 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Match of specific ingredients to ingredients should be canonicalized
2 participants