[Bug 21268] New: Can’t add to basket from staged file if base-level allocated is zero
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Bug ID: 21268 Summary: Can’t add to basket from staged file if base-level allocated is zero Change sponsored?: --- Product: Koha Version: 17.05 Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: r.delahunty@arts.ac.uk QA Contact: testopia@bugs.koha-community.org We recently carried out fiscal period close, and as we are not permitted to move remaining unspent funds we ended up with negative amounts in Total Available (due to open orders rolling forward into the new fiscal period, of course). We did not get around to adding any amounts so all Base-level allocated amounts remained zero. Since the fiscal period close we have been able to add to baskets using options OTHER than from a staged file. Selecting this option sees the Fund dropdown box (in the Default Accounting Details tab) not effective. We cannot see any of the funds. Once base-level allocated amounts are increased from zero this problem vanishes- funds are visible and selectable in the Fund pull-down. This is not a major problem, but it is a puzzle that this problem only appears with the stage file option. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Ray Delahunty from comment #0)
Since the fiscal period close we have been able to add to baskets using options OTHER than from a staged file.
Sure about that? It is not what I see: acqui/addorderiso2709.pl: if ( !defined $r->{budget_amount} || $r->{budget_amount} == 0 ) { acqui/basket.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { acqui/booksellers.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { acqui/neworderbiblio.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { acqui/neworderempty.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} <0) { acqui/orderreceive.pl: if ( !defined $r->{budget_amount} || $r->{budget_amount} == 0 ) { acqui/parcels.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { It's '== 0' vs '< 0' So we we should fix neworderempty and replace '<0' with '== 0' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|17.05 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Summary|Can’t add to basket from |Can't add to basket from |staged file if base-level |staged file if base-level |allocated is zero |allocated is zero -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We have seen the issue for normal ordering as well after migrations where the amounts hadn't been set yet or for funds that are set up purely for handling donations or 'exchanged' items. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I tested a bit on master: the funds = 0 now show when adding a new order, but are for example not in the fund pull down on receiving the order.
acqui/addorderiso2709.pl: if ( !defined $r->{budget_amount} || $r->{budget_amount} == 0 ) { acqui/basket.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { acqui/booksellers.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { acqui/neworderbiblio.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { acqui/neworderempty.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} <0) { acqui/orderreceive.pl: if ( !defined $r->{budget_amount} || $r->{budget_amount} == 0 ) { acqui/parcels.pl: if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) {
It's '== 0' vs '< 0'
So we we should fix neworderempty and replace '<0' with '== 0'
I am not sure what would be the right behaviour here. I think having to add 0.01 just to make a fund you want to use for handling 'free' orders is a bit clumsy right now. I wonder if the cleaner solution would be to just check if the fund exists and omit testing for the amount in all places. Or: Only test for negative with <0 everywhere. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Emma Ternrud <emma.ternrud@ub.gu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emma.ternrud@ub.gu.se -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I'm seeing this error when adding to a basket via a staged file on 19.11. We do have libraries using funds with $0 allocated to track donations and other situations where there is not an expected amount for the year. I'm in favor of Katrin's suggestion to simply check whether a fund exists and is active, rather then checking for an amount allocated. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Donna <bwsdonna@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|trivial |normal CC| |bwsdonna@gmail.com --- Comment #5 from Donna <bwsdonna@gmail.com> --- This is still an issue in 20.05 and is blocking workflows for libraries. The base fund allocation of 0.00 is becoming more common for libraries, so I expect this will be brought up more and more. If I can add an item directly into a basket using a 0.00 fund then that same behavior should be permitted using staged or new files. I think that expected behavior is just look to see if there is an active fund. Increasing the importance level as it blocks workflows. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 107455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107455&action=edit Bug 21268: Don't remove 0 allocated funds from fund list If a fund is created with a amount of 0, it will not appear in the fund list (when a new order is created for instance). 0 allocated funds can be used to track donations and other situations where there is not an expected amount for the year. Test plan: 0. Do not apply the patch 1. Create 1 active and 1 inactive budgets 2. Create some funds for each budgets, with amount > 0 and amount == 0 3. Add orders to basket => Note that the funds with amount == 0 are not displayed 4. Apply the patch 5. Add orders to basket (using the different possible ways we have) => Note that the funds with amount == 0 are displayed This change is applied to the different views of the acquisition module. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Without this patch, I can select a $0 fund for all methods of adding to a basket except: - duplicating an order (duplicate_orders.pl) - from a new file (addorderiso2709.pl) - from a staged file (also addorderiso2709.pl) Additionally, if I try to set my $0 fund via a budget code in the field set by MARCItemFieldstoOrder, it is not selected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107455|0 |1 is obsolete| | --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 107466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107466&action=edit Bug 21268: Don't remove 0 allocated funds from fund list If a fund is created with a amount of 0, it will not appear in the fund list (when a new order is created for instance). 0 allocated funds can be used to track donations and other situations where there is not an expected amount for the year. Test plan: 0. Do not apply the patch 1. Create 1 active and 1 inactive budgets 2. Create some funds for each budgets, with amount > 0 and amount == 0 3. Add orders to basket => Note that the funds with amount == 0 are not displayed 4. Apply the patch 5. Add orders to basket (using the different possible ways we have) => Note that the funds with amount == 0 are displayed This change is applied to the different views of the acquisition module. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107466|0 |1 is obsolete| | --- Comment #9 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107491&action=edit Bug 21268: Don't remove 0 allocated funds from fund list If a fund is created with a amount of 0, it will not appear in the fund list (when a new order is created for instance). 0 allocated funds can be used to track donations and other situations where there is not an expected amount for the year. Test plan: 0. Do not apply the patch 1. Create 1 active and 1 inactive budgets 2. Create some funds for each budgets, with amount > 0 and amount == 0 3. Add orders to basket => Note that the funds with amount == 0 are not displayed 4. Apply the patch 5. Add orders to basket (using the different possible ways we have) => Note that the funds with amount == 0 are displayed This change is applied to the different views of the acquisition module. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 26029 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|20.11.00 |20.11.00, 20.05.03 released in| | --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21268 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #13 from Aleisha Amohia <aleisha@catalyst.net.nz> --- I cannot recreate the bug in 19.11.x, all funds show in the fund list. Not backported. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org