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

Nutrient values specified in %DV are not converted correctly #6882

Closed
stephanegigandet opened this issue Jun 10, 2022 · 0 comments · Fixed by #6883
Closed

Nutrient values specified in %DV are not converted correctly #6882

stephanegigandet opened this issue Jun 10, 2022 · 0 comments · Fixed by #6883
Assignees
Labels
🐛 bug This is a bug, not a feature request. ✏️ Editing - Nutrition Nutrients

Comments

@stephanegigandet
Copy link
Contributor

Describe the bug

Minerals and vitamins that have a %DV value are not correctly converted to grams.

This is a regression introduced when we switched to using the nutrients taxonomy in Food.pm

86d1247#diff-351be5a181a0bf67d0ff930eae800771588040be0c2a334a98412e378da0b37aL245

To Reproduce

Go to https://us.openfoodfacts.org
Add a value for calcium with the % DV unit.

Expected behavior

The correct value in grams should be computed.

Screenshots

No response

Additional context

No response

Type of device

Other

Browser version

No response

Number of products impacted

No response

Time per product

No response

@stephanegigandet stephanegigandet self-assigned this Jun 10, 2022
stephanegigandet added a commit that referenced this issue Jul 18, 2022
fix: fix vitamin b1 thiamin %DV #6882
dipietroR added a commit that referenced this issue Jul 18, 2022
* refactor: adding perltidy to t/lang.t (#7044)

Implementing perltidy to t/lang.t , will have a merge conflict with PR
6085

* taxonomy: add new Polish translations (#7068)

* Polish translations of meat

* add additinal polish translations of popular ingredients

* taxonomy: Corrections to cheeses (#7065)

Update categories.txt

* refactor: adding perltidy to files (#7070)

Implementing perltidy to t/dataquality.t , t/dataqualityfood.t , t/export.t

* taxonomy: flaxseed fiber (#6945)

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* update taxonomy and tests

Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>

* docs: Add how-to for remote dev (Gitpod) (#7053)

* docs: Add how-to for remote dev (Gitpod)
* docs: Add references/badges for gitpod environments

* feat: Nutrient levels knowledge panels with facts and recommendations (#6980)

* feat: knowledge panels for nutrient levels #6947

* add quantity in nutrient panel title

* facts + recommendations for salt

* fixed conflict

* add info and recommendations for sugars, fat and saturated fat

* fix: fix vitamin b1 thiamin %DV  (#7072)

fix: fix vitamin b1 thiamin %DV #6882

* refactor: updating perl critic

Changing the perl critic config file to make it easier to pick and
choose what tests will run.

* feat: perlcritic unused variables check

* refactor: perlcritic github testing

* fetch depth

* add perlcritic

* better error message

* all errors

* allow ProductOpener::PerlStandards

* remove undef

* comment out severity 3

Commented outunused variable, severity 3 so that there are less merge
conflicts when implementing perltidy to files.

* refactor: dont look into .git directory

Making sure that perlcritic doesn't look into .git directory

* adding perlcritic to Makefile

* moving perlcritic to pull_request.yml

* default for perlcritic

* refactor: uncomment severity 3

* refactor: removing unused variables

Co-authored-by: Teiron <12804636+Teiron@users.noreply.github.com>
Co-authored-by: moon-rabbitOFF <34795011+moon-rabbitOFF@users.noreply.github.com>
Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>
Co-authored-by: Tushar <ditsuke@protonmail.com>
alexgarel pushed a commit that referenced this issue Jul 19, 2022
* refactor: adding perltidy to t/lang.t (#7044)

Implementing perltidy to t/lang.t , will have a merge conflict with PR
6085

* taxonomy: add new Polish translations (#7068)

* Polish translations of meat

* add additinal polish translations of popular ingredients

* taxonomy: Corrections to cheeses (#7065)

Update categories.txt

* refactor: adding perltidy to files (#7070)

Implementing perltidy to t/dataquality.t , t/dataqualityfood.t , t/export.t

* taxonomy: flaxseed fiber (#6945)

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* Update ingredients.txt

* update taxonomy and tests

Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>

* docs: Add how-to for remote dev (Gitpod) (#7053)

* docs: Add how-to for remote dev (Gitpod)
* docs: Add references/badges for gitpod environments

* feat: Nutrient levels knowledge panels with facts and recommendations (#6980)

* feat: knowledge panels for nutrient levels #6947

* add quantity in nutrient panel title

* facts + recommendations for salt

* fixed conflict

* add info and recommendations for sugars, fat and saturated fat

* fix: fix vitamin b1 thiamin %DV  (#7072)

fix: fix vitamin b1 thiamin %DV #6882

* refactor: updating perl critic

Changing the perl critic config file to make it easier to pick and
choose what tests will run.

* feat: perlcritic unused variables check

* refactor: perlcritic github testing

* fetch depth

* add perlcritic

* better error message

* all errors

* allow ProductOpener::PerlStandards

* remove undef

* comment out severity 3

Commented outunused variable, severity 3 so that there are less merge
conflicts when implementing perltidy to files.

* refactor: dont look into .git directory

Making sure that perlcritic doesn't look into .git directory

* adding perlcritic to Makefile

* moving perlcritic to pull_request.yml

* default for perlcritic

* refactor: uncomment severity 3

* refactor: removing unused variables

Co-authored-by: Teiron <12804636+Teiron@users.noreply.github.com>
Co-authored-by: moon-rabbitOFF <34795011+moon-rabbitOFF@users.noreply.github.com>
Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>
Co-authored-by: Tushar <ditsuke@protonmail.com>
LandonPattison pushed a commit that referenced this issue Jul 24, 2022
fix: fix vitamin b1 thiamin %DV #6882
LandonPattison pushed a commit that referenced this issue Jul 25, 2022
fix: fix vitamin b1 thiamin %DV #6882
LandonPattison pushed a commit that referenced this issue Jul 25, 2022
fix: fix vitamin b1 thiamin %DV #6882
LandonPattison pushed a commit that referenced this issue Jul 25, 2022
fix: fix vitamin b1 thiamin %DV #6882
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug, not a feature request. ✏️ Editing - Nutrition Nutrients
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant