[Bug 18467] New: Error calling count on undefined bib in basket.pl if order cancelled and record deleted
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Bug ID: 18467 Summary: Error calling count on undefined bib in basket.pl if order cancelled and record deleted Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: Create a basket Add an order Cancel the order and delete the record Error loading basket! -- 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=18467 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=18467 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 62511 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62511&action=edit Bug 18467 - Error calling count on undefined bib in basket.pl if order cancelled and record deleted To test: 1 - Create a basket 2 - Order a bib 3 - Cancel order and delete record 4 - You cannot view basket 5 - Apply patch 6 - View basket 7 - There should not be an error r calling count on undefined bib in basket.pl if order cancelled and record deleted -- 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=18467 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |18256 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18256 [Bug 18256] Koha::Biblio - Remove GetItemsCount -- 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=18467 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=18467 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62511|0 |1 is obsolete| | --- Comment #2 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 62514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62514&action=edit Bug 18467 - Error calling count on undefined bib in basket.pl if order cancelled and record deleted To test: 1 - Create a basket 2 - Order a bib 3 - Cancel order and delete record 4 - You cannot view basket 5 - Apply patch 6 - View basket 7 - There should not be an error r calling count on undefined bib in basket.pl if order cancelled and record deleted Followed test plan and it works as specified Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- 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=18467 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- 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=18467 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The error is: Can't call method "items" on an undefined value at /home/vagrant/kohaclone/acqui/basket.pl line 470. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think I have a counter-patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62514|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 62537 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62537&action=edit Bug 18467: Handle orders with deleted biblio when viewing a basket If the bibliographic record of an order has been removed, $order->{bibionumber} is undefined. We need to handle this specific case correctly. To test: 1 - Create a basket 2 - Order a bib 3 - Cancel order and delete record 4 - You cannot view basket 5 - Apply patch 6 - View basket 7 - There should not be an error r calling count on undefined bib in basket.pl if order cancelled and record deleted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|nick@bywatersolutions.com |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Needs Signoff --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, Reading the code I think it's important to clearly highlight this specific case. Moreover if the bibliographic record does no longer exist, we can skip the whole block. Let me know if you agree. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Looks right to me, much cleaner. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62537|0 |1 is obsolete| | --- Comment #8 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 62570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62570&action=edit Bug 18467: Handle orders with deleted biblio when viewing a basket If the bibliographic record of an order has been removed, $order->{bibionumber} is undefined. We need to handle this specific case correctly. To test: 1 - Create a basket 2 - Order a bib 3 - Cancel order and delete record 4 - You cannot view basket 5 - Apply patch 6 - View basket 7 - There should not be an error r calling count on undefined bib in basket.pl if order cancelled and record deleted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Alex Buckley <alexbuckley@catalyst.net.nz> 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=18467 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62570|0 |1 is obsolete| | --- Comment #9 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 62571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62571&action=edit Bug 18467: Handle orders with deleted biblio when viewing a basket If the bibliographic record of an order has been removed, $order->{bibionumber} is undefined. We need to handle this specific case correctly. To test: 1 - Create a basket 2 - Order a bib 3 - Cancel order and delete record 4 - You cannot view basket 5 - Apply patch 6 - View basket 7 - There should not be an error r calling count on undefined bib in basket.pl if order cancelled and record deleted Followed test plan, works as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Nick Clemens <nick@bywatersolutions.com> 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=18467 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62571|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 62654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62654&action=edit Bug 18467: Handle orders with deleted biblio when viewing a basket If the bibliographic record of an order has been removed, $order->{bibionumber} is undefined. We need to handle this specific case correctly. To test: 1 - Create a basket 2 - Order a bib 3 - Cancel order and delete record 4 - You cannot view basket 5 - Apply patch 6 - View basket 7 - There should not be an error r calling count on undefined bib in basket.pl if order cancelled and record deleted Followed test plan, works as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This doesn't apply cleanly on 16.11.x, please rebase/comment if it's needed there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18467 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Missed the dependency last time - tested and the problem isn't present in 16.11.x. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org