[Bug 26108] New: Checkins should not require item to have been checked out
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26108 Bug ID: 26108 Summary: Checkins should not require item to have been checked out Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Koha is giving an internal server error when trying to check in an item that was not checked out. Possibly due to bug 26063? -- 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=26108 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26063 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26063 [Bug 26063] Use Koha::Plugins->call for other hooks -- 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=26108 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on|26063 |25855 Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It's coming from bug 25855 actually. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 [Bug 25855] Add hook to AddRenewal using a new _after_circ_actions method in circulation https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26063 [Bug 26063] Use Koha::Plugins->call for other hooks -- 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=26108 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26108 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 107618 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107618&action=edit Bug 26108: (bug 25855 follow-up) Call after_circ_action hook only if issue exists AddReturn can be called on an item even if it's not checked out (to trigger holds for instance). The hook should (?) not be called in that situation Test plan: Confirm the above and that the following tests are now passing: t/db_dependent/SIP/Message.t t/db_dependent/Reserves.t t/db_dependent/Circulation/issue.t t/db_dependent/SIP/Transaction.t t/db_dependent/Circulation.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26108 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I have pushed this patch to fix master and not block people who would test other patches today. But a SO and QA is required to confirm it's the expected behaviour. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26108 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26108 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 107640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107640&action=edit Bug 26108: Regression tests The current implementation makes the assumption that if $issue is defined, then it is the 'return' use case. This is correct, but incomplete: after verifying that there's actually an issue, the return can be rejected for various reasons. This patch introduces a regression test for one of those situations (which I consider enough for testing purposes) . It highlights that the hook shouldn't be called if there hasn't been an actual checkin. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Plugins/Circulation_hooks.t => FAIL: Tests fail because there's an unexpected warining printed by the erroneous plugin call (i.e. there's been no return but the plugin is called anyway). 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=26108 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 107641 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107641&action=edit Bug 26108: Only call the plugin hook if a return took place This patch makes the hooks be called only if the checkin is effective (i.e. if it is not rejected for some reason. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Plugins/Circulation_hooks.t => FAIL: Tests fail 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=26108 Tomás Cohen Arazi <tomascohen@gmail.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=26108 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=26108 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.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=26108 --- Comment #6 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=26108 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Missing dependency for 20.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org