[Bug 24013] New: Transferring a checked out item gives a software error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 Bug ID: 24013 Summary: Transferring a checked out item gives a software error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To reproduce: 1. check out an item 2. Go to circulation -> transfer and put in the barcode of the item you just checked out 3. error: Can't call method "borrowernumber" on unblessed reference at /home/vagrant/kohaclone/C4/Circulation.pm line 350 This occurs in the C4::Circulation::transferbook subroutine. It happens because Bug 18276 accidentally reintroduces an old subroutine (GetOpenIssue) that returns an unblessed reference. This line should use Koha Objects instead. Code causing an error: my $issue = GetOpenIssue($itemnumber); # check if it is still issued to someone, return it... if ( $issue ) { AddReturn( $barcode, $fbr ); $messages->{'WasReturned'} = $issue->borrowernumber; } Suggested fix: my $issue = Koha::Checkouts->find({ itemnumber => $itemnumber }); -- 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=24013 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- 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=24013 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|Academy | Status|NEW |ASSIGNED CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|minor |major Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Upping severity. -- 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=24013 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=24013 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95608 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95608&action=edit Bug 24013: Add tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95609 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95609&action=edit Bug 24013: Fix transferbook if item is checked out Wrong conflict resolution, the following commit 6eade474ed3a84a5ba372a26ac27bf9fb4bd2299 Bug 18276: Remove GetBiblioFromItemNumber - Easy ones restored a previous change from commit 546379cc92b733cb29a0b70247a72c770afdad26 Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls Not that "easy" or "simple"... Test plan: Run the test before and after this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Hello Aleisha, I removed the Academy kw and provided 2 patches, a bugfix and the tests to cover the changes. If you need this bug report to use as example, I can obsolete the bugfix and keep the tests. It sounded quite urgent to fix as it impact stable releases. Cheers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95608|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 95695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95695&action=edit Bug 24013: Add tests 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=24013 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95609|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 95696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95696&action=edit Bug 24013: Fix transferbook if item is checked out Wrong conflict resolution, the following commit 6eade474ed3a84a5ba372a26ac27bf9fb4bd2299 Bug 18276: Remove GetBiblioFromItemNumber - Easy ones restored a previous change from commit 546379cc92b733cb29a0b70247a72c770afdad26 Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls Not that "easy" or "simple"... Test plan: Run the test before and after this patch. 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=24013 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for the quick fix, works well.. Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95695|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 95755 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95755&action=edit Bug 24013: Add tests 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=24013 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95696|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 95756 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95756&action=edit Bug 24013: Fix transferbook if item is checked out Wrong conflict resolution, the following commit 6eade474ed3a84a5ba372a26ac27bf9fb4bd2299 Bug 18276: Remove GetBiblioFromItemNumber - Easy ones restored a previous change from commit 546379cc92b733cb29a0b70247a72c770afdad26 Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls Not that "easy" or "simple"... Test plan: Run the test before and after this patch. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |19.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=24013 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 --- Comment #11 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Jonathan Druart from comment #4)
Hello Aleisha,
I removed the Academy kw and provided 2 patches, a bugfix and the tests to cover the changes. If you need this bug report to use as example, I can obsolete the bugfix and keep the tests.
It sounded quite urgent to fix as it impact stable releases.
Cheers
No worries Jonathan, thank you for fixing! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #12 from Josef Moravec <josef.moravec@gmail.com> --- This affects 19.05 too and applies cleanly, can you push it Lucas? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|19.11.00 |19.11.00, 19.05.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org