diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm index 2b63d90434..a18cc617bc 100644 --- a/Koha/ILL/Request.pm +++ b/Koha/ILL/Request.pm @@ -1725,6 +1725,12 @@ sub check_out { } # We can allegedly check out, so make it so + # Mark as ILL checkout in the logs to track system-initiated checkouts. + # AddIssue signature is ( $patron, $barcode, $datedue, $cancelreserve, + # $issuedate, $sipmode, $params ) - pad to position 7 so the params + # hashref is not mistaken for $issuedate or $sipmode. + push @issue_args, undef while @issue_args < 6; + push @issue_args, { forced => ['ILL_CHECKOUT'] }; my $issue = C4::Circulation::AddIssue(@issue_args); if ($issue) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc index a1703f93ea..f91bd5111a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc @@ -269,6 +269,10 @@ Unseen renewal [% CASE 'SEEN' %] Seen renewal + [% CASE 'OFFLINE_CIRCULATION' %] + Offline circulation checkout + [% CASE 'ILL_CHECKOUT' %] + ILL system checkout [% CASE %] [% override | html %] [% END %] diff --git a/offline_circ/process_koc.pl b/offline_circ/process_koc.pl index 36bed2d148..5fecdf8b9b 100755 --- a/offline_circ/process_koc.pl +++ b/offline_circ/process_koc.pl @@ -229,7 +229,10 @@ sub kocIssueItem { if ( Date_to_Days( $i_y, $i_m, $i_d ) < Date_to_Days( $c_y, $c_m, $c_d ) ) { ## Current issue to a different persion is older than this issue, return and issue. - C4::Circulation::AddIssue( $patron, $circ->{'barcode'}, undef, undef, $circ->{'date'} ) unless (DEBUG); + C4::Circulation::AddIssue( + $patron, $circ->{'barcode'}, undef, undef, $circ->{'date'}, undef, + { forced => ['OFFLINE_CIRCULATION'] } + ) unless (DEBUG); push @output, { issue => 1, title => $biblio->title, @@ -250,7 +253,10 @@ sub kocIssueItem { } } } else { ## Item is not checked out to anyone at the moment, go ahead and issue it - C4::Circulation::AddIssue( $patron, $circ->{'barcode'}, undef, undef, $circ->{'date'} ) unless (DEBUG); + C4::Circulation::AddIssue( + $patron, $circ->{'barcode'}, undef, undef, $circ->{'date'}, undef, + { forced => ['OFFLINE_CIRCULATION'] } + ) unless (DEBUG); push @output, { issue => 1, title => $biblio->title,