Open bfourgeaud opened 6 months ago
Thanks for reporting it!
I edited and saved the product, and now it appears: https://world.openfoodfacts.org/api/v2/product/3451790439506
For your information @bfourgeaud, when we apply changes in the code (add translation in the taxonomy, for example, or in this case add a new field in the API (https://github.com/openfoodfacts/openfoodfacts-server/pull/9608)) after deploying the changes in production, it is applied on the products only when they are edited and saved. And in that particular case of the product you mentioned, you need to be moderator because the product was modified by the producer and protected from contributors modifications.
What
product_quantity_unit
is mostly not presentSteps to reproduce the behavior
La Crème Légère Epaisse 12%MG
(https://fr.openfoodfacts.org/cgi/search.pl?search_terms=La%20Cr%C3%A8me%20L%C3%A9g%C3%A8re%20Epaisse%2012%MG&tagtype_0=languages&tag_contains_0=contains&tag_0=fr&tagtype_1=countries&tag_contains_1=contains&tag_1=fr&sort_by=unique_scans_n&page_size=20&json=1)quantity
field is33 cl
product_quantity
is correcly extracted to the value of 330 (Their was a conversion from cl to ml done server-side)product_quantity_unit
is not presentExpected behavior
Why
product_quantity
is parsed from the user input (quantity
), and then converted to a standard unit (ml in that case). In that sense, the server has the knowledge of what unit is used. So it should also be sent back to the clientquantity
field that is already done server-side.Additional context
This issue does not exist for products that have been updated lately (I edited product 3155250001554 and it has the
product_quantity_unit
field)Type of device
Number of products impacted
Most products that are not in grams