Bugzilla – Attachment 107618 Details for
Bug 26108
Checkins should not require item to have been checked out
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26108: (bug 25855 follow-up) Call after_circ_action hook only if issue exists
Bug-26108-bug-25855-follow-up-Call-aftercircaction.patch (text/plain), 1.49 KB, created by
Jonathan Druart
on 2020-07-31 07:51:55 UTC
(
hide
)
Description:
Bug 26108: (bug 25855 follow-up) Call after_circ_action hook only if issue exists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-07-31 07:51:55 UTC
Size:
1.49 KB
patch
obsolete
>From 6906fa9cef53b912b565845840b496da906ef6a4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 31 Jul 2020 09:49:06 +0200 >Subject: [PATCH] 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 >--- > C4/Circulation.pm | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index bda4b00490..4b468f80f8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2206,14 +2206,16 @@ sub AddReturn { > } > } > >- my $checkin = Koha::Old::Checkouts->find($issue->id); >+ if ( $issue ) { >+ my $checkin = Koha::Old::Checkouts->find($issue->id); > >- Koha::Plugins->call('after_circ_action', { >- action => 'checkin', >- payload => { >- checkout=> $checkin >- } >- }); >+ Koha::Plugins->call('after_circ_action', { >+ action => 'checkin', >+ payload => { >+ checkout=> $checkin >+ } >+ }); >+ } > > return ( $doreturn, $messages, $issue, ( $patron ? $patron->unblessed : {} )); > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26108
: 107618 |
107640
|
107641