Opened 17 years ago
Closed 17 years ago
#466 closed defect (fixed)
Remaining Quantity not display in extracts
Reported by: | base | Owned by: | Martin Svensson |
---|---|---|---|
Priority: | minor | Milestone: | BASE 2.2.2 |
Component: | core | Version: | 2.1.1 |
Keywords: | quantity | Cc: |
Description
Hello, I thought Bug #448 seems to fix this problem, however I still doesn't work for me. I'm running 2.1.1 and the attached shot shows an emtpy "remaining" field for the extract. It's a bit strange because sometimes it works and some other it does not. I think the problem comes if you try to update the fields once you have created an empty extract. In any case the update does not seem to change the remaining quantity value. Could you please fix the problem ??
Attachments (1)
Change History (13)
Changed 17 years ago by
Attachment: | extracts.jpg added |
---|
comment:1 Changed 17 years ago by
Milestone: | BASE 2.1.2 → BASE 2.x+ |
---|---|
Priority: | major → trivial |
Your description is not very clear on how to reproduce the error. It works fine when I try it. Can you please give a step-by-step instructions how to reproduce the error.
comment:2 Changed 17 years ago by
Ok, 1:Create a sample "Adipose" 2:Create an empty extract (don't fill neither original quantity or used quantity).Save 3:Edit your extract, add the used quantity and original quantity. SAVE ->Problem, you don't see the remaining quantity. More over when you delete an extract the sample doesn't get updated properly and the remaining quantity is wrong.
Is that ok ?
comment:3 Changed 17 years ago by
The sample quantity does not get updated when you delete the extract.
comment:4 Changed 17 years ago by
Milestone: | BASE 2.x+ → BASE 2.2.1 |
---|---|
Priority: | trivial → minor |
comment:5 Changed 17 years ago by
Component: | web → core |
---|---|
Milestone: | BASE 2.2.1 → BASE 2.2 |
Owner: | changed from Johan Enell to Nicklas Nordborg |
Status: | new → assigned |
The problem is that the remaining quantity is given a null value if no original value is specified when the extract is created. Then, whenever you change the original value the remainging still is null since in the database world you can't add or subtract anything from a null value. The end result is still null.
A possible solution is to put 0 for the remaining quantity in the case no original is specified. Then we can always add/subtract when the original value changes. When asked for the remaining quantity we have to return null if the original is null.
The fix should be rather simple to implement, but we also has to consider those biomaterials that already has a null value in the remaining quantity and calculate a new value for them.
comment:6 Changed 17 years ago by
comment:7 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:8 Changed 17 years ago by
Milestone: | BASE 2.2 → BASE 2.2.2 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Reopened since the previous upgrade failed.
comment:9 Changed 17 years ago by
Owner: | changed from Nicklas Nordborg to Martin Svensson |
---|---|
Status: | reopened → new |
comment:10 Changed 17 years ago by
Status: | new → assigned |
---|
comment:11 Changed 17 years ago by
I don't think the updateToSchemaVersion29() works for Postgres. See the mailing list archive: http://sourceforge.net/mailarchive/forum.php?thread_id=31617247&forum_id=12992
It is not the same error as the MySQL 5.0.27 bug.
comment:12 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
screenshot