Misc ingredient amounts interpreted wrong

Bug #1160610 reported by launchpad@davidpronk.nl on 2013-03-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mik Firestone

Bug Description

Whenever I try to fill out an amount for one of the miscellaneous ingredients the units keep changing. I would like to add 3 grams of orange peels but than the amount automatically changes to 3,000 mL. I have seen this behaviour occur in other amount fields as well, but not in a consistent way.
I run Brewtarget 2.0.0 on Mac osX 10.8.3

Philip (rocketman768) wrote :

Miscellaneous ingredients can be measured either by weight or volume, and the default is volume. Please see the Misc Editor and check the "Amount is weight" box.

Changed in brewtarget:
status: New → Invalid

I have indeed checked the "Amount is weight" box, but I am unable to fill out 3 grams. Whatever I try it changes back to kg.
0.003 kg becomes 3,000 kg
3,000 g becomes 3,000 kg
0.03 kg becomes 30,000 g (which is correct)

affects: brewtarget → ubuntu
Changed in ubuntu:
status: Invalid → Confirmed
affects: ubuntu → brewtarget
Changed in brewtarget:
status: Confirmed → New
Mik Firestone (mikfire) wrote :

This is a bug, I suspect it has something to do with the units and scale changes. The misc ingredients are weird because they can be either weight or volume, and I don't think (specifically) the scaling algorithms are going to like that.

Changed in brewtarget:
status: New → Confirmed
assignee: nobody → Mik Firestone (mikfire)
importance: Undecided → Medium
Mik Firestone (mikfire) wrote :

So out of curiosity. Did you change the "amount is weight" flag before or after you added it to the recipe? If you changed the flag after, you may want to remove the orange peel from the recipe and re-add it. On my development box, I can replicate this bug and removing it from the recipe and re-adding seems to fix it.

I still consider this a bug, but I wanted to see if the work-around works.

Yes, that is exactly the case. If I change the "Amount is weight" before adding the ingredient it works just fine. But when doing so after the adding it fails to show the correct weight. For now I can use the workaround, but it is indeed a bug.
Thanks for the help so far.

Mik Firestone (mikfire) wrote :

Fixed in merge request 35. There's a longer explanation for why the bug existed, but the short form is that I added a check box to the misc table to switch between weights and volumes for the misc tables.

Mik Firestone (mikfire) on 2013-04-05
Changed in brewtarget:
status: Confirmed → Fix Committed
Philip (rocketman768) on 2013-04-06
Changed in brewtarget:
milestone: none → 2.0.2
Philip (rocketman768) on 2013-09-11
summary: - Filling amounts is buggy
+ Misc ingredient amounts interpreted wrong
Rubisco (terox89) wrote :

There is also a more general problem for me with the misc tab. When ever I want to edit the ingredient (after having the same problem as OP) the wrong ingredient is opened in the editor. So I think that there is some problem between the display (on the misc list and on your added misc items) and the data it refers to. And on top of that, the inserted ingredient duplicates in the database list. (But that was already reported if I remember well)

Example : when I add "Irish moss" to my misc ingredients, the value is mL (which I assume is correct, however I want to use grams), and when I want to change Irish moss to be expressed in grams, it opens the "Cubeb Berries" editor. And I have a second "Irish Moss" in my misc data list.

Mik Firestone (mikfire) wrote :

Rubisco, this has just been found and fixed. It will be in the v2.0.2 release.

Next time, would you please open a new bug? I don't usually check bugs marked as "fix committed" for new comments.

Philip (rocketman768) on 2014-02-02
Changed in brewtarget:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers