[Bug 36620] New: Broken order management for suggestions with quantity
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 Bug ID: 36620 Summary: Broken order management for suggestions with quantity Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P3 Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 34708 After applying bug 34708 the management of orders created from suggestions with defined quantity is broken. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34708 [Bug 34708] Ability to modify an order line to increase quantity of ordered item -- 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=36620 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=36620 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 165004 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165004&action=edit Bug 36620: Broken order management for suggestions with quantity Test plan ========= Scenario A (the bug) -------------------- 1. In OPAC, create a purchase suggestion with defined quantity ("Copies" in staff interface). 2. Accept the suggestion. 2. Have a budget, fund, vendor etc. to use the Acquisitions module. Ensure that AcqCreateItem syspref is set to 'placing an order'. 3. Create a new basket and add to basket an order line from accepted suggestion. Note the initial Quantity set to the quantity entered in suggestion. Note increasing this number while you add items to the order with the 'Add item' button. Save the order, close the basket. 4. Start receiving shipments for this order (create invoice etc.). Receive items you created by 'Add item' until there is nothing more to receive. Note the number of unreecived items in the order (eqal to the initial quantity from the suggestion) that cannot be regulary received (with the items table on the left). This is the *bug*. [This is due to the ambiguity of $data->{quantity} in the neworderempty.pl -- it normally comes from the order: GetOrder, but in the case of a yet empty order created from a suggestion, it comes from the suggestions table: GetSuggestion]. 5. Apply the patch, restart plack etc. 6. Repeat step 2 and 3. While adding items in order note that you start from quantity 0, and that the suggested quantity is shown in brackets. 7. Continue with p. 4. You should be able to receive the order in the regular way (with the items created). Scenario B (bonus) ------------------ Repeat the above with AcqCreateItem syspref is set to 'receiving the order', or 'cataloging the record'. These cases do not create a bug as it does the case with 'placing an order'. Note however, after applying the patch, the initial quantity in the order is set to 0 and there is the bonus infomation about the suggested number of items (from the suggestion). Sponsored-by: Ignatianum University in Cracow -- 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=36620 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- 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=36620 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |januszop@gmail.com |ity.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=36620 Roman Dolny <roman.dolny@jezuici.pl> 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=36620 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165004|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 165032 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165032&action=edit Bug 36620: Broken order management for suggestions with quantity Test plan ========= Scenario A (the bug) -------------------- 1. In OPAC, create a purchase suggestion with defined quantity ("Copies" in staff interface). 2. Accept the suggestion. 2. Have a budget, fund, vendor etc. to use the Acquisitions module. Ensure that AcqCreateItem syspref is set to 'placing an order'. 3. Create a new basket and add to basket an order line from accepted suggestion. Note the initial Quantity set to the quantity entered in suggestion. Note increasing this number while you add items to the order with the 'Add item' button. Save the order, close the basket. 4. Start receiving shipments for this order (create invoice etc.). Receive items you created by 'Add item' until there is nothing more to receive. Note the number of unreecived items in the order (eqal to the initial quantity from the suggestion) that cannot be regulary received (with the items table on the left). This is the *bug*. [This is due to the ambiguity of $data->{quantity} in the neworderempty.pl -- it normally comes from the order: GetOrder, but in the case of a yet empty order created from a suggestion, it comes from the suggestions table: GetSuggestion]. 5. Apply the patch, restart plack etc. 6. Repeat step 2 and 3. While adding items in order note that you start from quantity 0, and that the suggested quantity is shown in brackets. 7. Continue with p. 4. You should be able to receive the order in the regular way (with the items created). Scenario B (bonus) ------------------ Repeat the above with AcqCreateItem syspref is set to 'receiving the order', or 'cataloging the record'. These cases do not create a bug as it does the case with 'placing an order'. Note however, after applying the patch, the initial quantity in the order is set to 0 and there is the bonus infomation about the suggested number of items (from the suggestion). Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165032|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 166757 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166757&action=edit Bug 36620: Broken order management for suggestions with quantity Test plan ========= Scenario A (the bug) -------------------- 1. In OPAC, create a purchase suggestion with defined quantity ("Copies" in staff interface). 2. Accept the suggestion. 2. Have a budget, fund, vendor etc. to use the Acquisitions module. Ensure that AcqCreateItem syspref is set to 'placing an order'. 3. Create a new basket and add to basket an order line from accepted suggestion. Note the initial Quantity set to the quantity entered in suggestion. Note increasing this number while you add items to the order with the 'Add item' button. Save the order, close the basket. 4. Start receiving shipments for this order (create invoice etc.). Receive items you created by 'Add item' until there is nothing more to receive. Note the number of unreecived items in the order (eqal to the initial quantity from the suggestion) that cannot be regulary received (with the items table on the left). This is the *bug*. [This is due to the ambiguity of $data->{quantity} in the neworderempty.pl -- it normally comes from the order: GetOrder, but in the case of a yet empty order created from a suggestion, it comes from the suggestions table: GetSuggestion]. 5. Apply the patch, restart plack etc. 6. Repeat step 2 and 3. While adding items in order note that you start from quantity 0, and that the suggested quantity is shown in brackets. 7. Continue with p. 4. You should be able to receive the order in the regular way (with the items created). Scenario B (bonus) ------------------ Repeat the above with AcqCreateItem syspref is set to 'receiving the order', or 'cataloging the record'. These cases do not create a bug as it does the case with 'placing an order'. Note however, after applying the patch, the initial quantity in the order is set to 0 and there is the bonus infomation about the suggested number of items (from the suggestion). Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 166758 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166758&action=edit Bug 36620: (QA follow-up) Add missing filters -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 166759 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166759&action=edit Bug 36620: (QA follow-up) Tidy controller -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Passing QA here, a couple of minor follow-ups were needed to make the QA scripts happy. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 Jennifer Weston <jennifer.weston@equinoxinitiative.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jennifer.weston@equinoxinit | |iative.org --- Comment #8 from Jennifer Weston <jennifer.weston@equinoxinitiative.org> --- Great fix - thanks! Would it be possible to backport this to 23.11.x for upcoming 23.11.06? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Jennifer Weston from comment #8)
Great fix - thanks! Would it be possible to backport this to 23.11.x for upcoming 23.11.06?
That would be great, because I am getting reports of this problem from people using 23.11.x. (I'll be backporting it in a moment for my clients, and I'll report here if there's any issues with that.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 166757 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166757 Bug 36620: Broken order management for suggestions with quantity Review of attachment 166757: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=36620&attachment=166757) ----------------------------------------------------------------- ::: acqui/neworderempty.pl @@ +206,5 @@
# otherwise, retrieve suggestion information. elsif ($suggestionid) { $data = GetSuggestion($suggestionid); + $data->{quantitysugg} = $data->{quantity}; + undef $data->{quantity};
It's too late now, but this probably could've been "$data->{quantitysugg} = delete $data->{quantity}" instead. Not a big deal. Just sharing for next time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- The "Bug 36620: (QA follow-up) Tidy controller" patch doesn't apply cleanly on 23.11.x because "main" has bug 35927 applied first. So I'll add that as a dependency and try again. Looks like a small change... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35927 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35927 [Bug 35927] Selecting MARC framework again doesn't work when adding to basket from an external source -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|35927 | --- Comment #12 from David Cook <dcook@prosentient.com.au> --- Blarg... "Bug 36620: (QA follow-up) Tidy controller" relies on bug 34478 which isn't going to be backported. (Rather than add it as a dependency, I'll remove bug 35927 as a dependency, because they're just dependencies of that tidy patch...) I'm just going to skip that patch rather than try to do a 23.11.x version of it, but that has some risks for future backporting. I'll leave it up to the RMaint whether they want to skip that last patch, or if they want to do a 23.11 version... Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35927 [Bug 35927] Selecting MARC framework again doesn't work when adding to basket from an external source -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 --- Comment #13 from Jennifer Weston <jennifer.weston@equinoxinitiative.org> --- (In reply to David Cook from comment #12)
Blarg... "Bug 36620: (QA follow-up) Tidy controller" relies on bug 34478 which isn't going to be backported. (Rather than add it as a dependency, I'll remove bug 35927 as a dependency, because they're just dependencies of that tidy patch...)
I'm just going to skip that patch rather than try to do a 23.11.x version of it, but that has some risks for future backporting.
I'll leave it up to the RMaint whether they want to skip that last patch, or if they want to do a 23.11 version...
David - thanks for testing out the backporting options and dependency effects. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Pushed to stable Version(s)|24.05.00 |24.05.00,23.11.06 released in| | --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36620 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Not needed in 23.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org