After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777517 - Ingredients with custom units are not saved
Ingredients with custom units are not saved
Status: RESOLVED FIXED
Product: recipes
Classification: Other
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: Recipes maintainer(s)
Recipes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-01-20 04:09 UTC by erusan
Modified: 2017-02-18 03:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description erusan 2017-01-20 04:09:40 UTC
If I input an invalid ingredient entry (ie, ingredient "Onion", enter amount as "1", unit as "large" typed into the unit field and hitting enter afterwards), the ingredient list displays the entry as if it is valid. However, saving the recipe removes all such entries with these invalid units.

No indication is given to the user that these list items are invalid or will be removed. This might affect the first two recipes I submitted.
Comment 1 Matthias Clasen 2017-01-20 18:26:40 UTC
there is a great variety of words that people might want to use as units: bushels, bunches, boxes, glasses, packs, satchels,...

I think what we need to do here is:
1) accept such strings as unit names
2) use them as-is in ingredient lists
3) leave them out when we implement unit conversion

In the case of the large onion, I think I'd rather parse this as an ingredient with a qualifier: Onion, large
Comment 2 erusan 2017-01-20 18:46:05 UTC
That sounds like a good way to go. Accepting arbitrary units would be ideal. My concern is just that it was throwing out data after showing it as valid.
Comment 3 Sylvia Sanchez 2017-02-16 19:40:12 UTC
Happens to me too. I added ingredients that aren't listed and this resulted in a weird recipe showing some ingredients but not others.
Comment 4 Sylvia Sanchez 2017-02-17 13:50:21 UTC
Also I just noticed that if you type 1,5 kg (1500 grams or one and a half kilo) it results in not saving the ingredient BUT if you type the same ingredient (that is not listed BTW) with 1500 g it is saved. Also typing the very same ingredient with 1.5 kg as amount results in showing the ingredient.
The problem I see is related to language and localisation; in English a dot means decimal (1.5 kg == 1500 g) but in other languages is a comma (1,5 kg == 1500 g).
Any possible solution on this?