[Bug 29804] New: Koha::Hold->is_pickup_location_valid explodes if empty list of pickup locations
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 Bug ID: 29804 Summary: Koha::Hold->is_pickup_location_valid explodes if empty list of pickup locations Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Due to bug 28871, there's a problem in production when checking if a pickup location is valid using Koha::Hold->is_pickup_location_valid. I file this bug because the other one is blocked and is not clear what path it will take, but this is affecting users. -- 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=29804 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28871 -- 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=29804 Tomás Cohen Arazi <tomascohen@gmail.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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 129048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129048&action=edit Bug 29804: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 129049 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129049&action=edit Bug 29804: Fix Koha::Hold->is_pickup_location_valid exploding This trivial patch acknowledges the fact bug 28871 is probably not going to be pushed, and changes the method so it, internally, uses Koha::Item->pickup_locations and Koha::Biblio->pickup_locations in scalar context. This is probably the correct solution as the discussion on bug 28883 points towards the future removal of the use of wantarray altogether, eventually. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => FAIL: It explodes as we see in production, with: The method Koha::Libraries->branchcode is not covered by tests! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com, | |lucas@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com, | |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=29804 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29806 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29806 [Bug 29806] ->pickup_locations should always be called in scalar context -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 David Nind <david@davidnind.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=29804 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129048|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 129054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129054&action=edit Bug 29804: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129049|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 129055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129055&action=edit Bug 29804: Fix Koha::Hold->is_pickup_location_valid exploding This trivial patch acknowledges the fact bug 28871 is probably not going to be pushed, and changes the method so it, internally, uses Koha::Item->pickup_locations and Koha::Biblio->pickup_locations in scalar context. This is probably the correct solution as the discussion on bug 28883 points towards the future removal of the use of wantarray altogether, eventually. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => FAIL: It explodes as we see in production, with: The method Koha::Libraries->branchcode is not covered by tests! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129054|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 129078 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129078&action=edit Bug 29804: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> 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=29804 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129055|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 129079 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129079&action=edit Bug 29804: Fix Koha::Hold->is_pickup_location_valid exploding This trivial patch acknowledges the fact bug 28871 is probably not going to be pushed, and changes the method so it, internally, uses Koha::Item->pickup_locations and Koha::Biblio->pickup_locations in scalar context. This is probably the correct solution as the discussion on bug 28883 points towards the future removal of the use of wantarray altogether, eventually. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Hold.t => FAIL: It explodes as we see in production, with: The method Koha::Libraries->branchcode is not covered by tests! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> 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=29804 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work... no regressions, bug is fixed.. QA script happy.. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29844 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29844 [Bug 29844] Remove uses of wantarray in Koha::Objects -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|29844 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29844 [Bug 29844] Remove uses of wantarray in Koha::Objects -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, 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=29804 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com Version(s)|22.05.00 |22.05.00,21.11.03 released in| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|22.05.00,21.11.03 |22.05.00,21.11.03,21.05.11 released in| | CC| |andrew@bywatersolutions.com --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29804 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net Resolution|--- |FIXED --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- What would the scenario to trigger this bug? The fix rely on bug 27131 which isn't in 20.11.x so that make things hard. (can't backport 27131) And raise the question of the 20.11.x being affected or not. So, can't backport to 20.11.x. If there is an interest in having this backported, please confirm validity or help to check for it as a first step. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org