Bug 41358: Log forced overrides for offline and ILL checkouts
This patch updates offline circulation and ILL checkouts to properly record their nature in circulation logs as forced transactions. Offline circulation (process_koc.pl): - Offline transactions have already occurred without access to normal circulation checks - Now marks these as forced with 'OFFLINE_CIRCULATION' override code - This helps identify historical transactions that bypassed checks ILL checkouts (Koha/ILL/Request.pm): - ILL checkouts are system-initiated and may bypass certain restrictions by design - Now marks these as forced with 'ILL_CHECKOUT' override code - This helps track and report on ILL circulation activity separately Display updates (action-logs.inc): - Added translation strings for both new override codes: - OFFLINE_CIRCULATION: "Offline circulation checkout" - ILL_CHECKOUT: "ILL system checkout" - These will now display properly in Tools > Log viewer This ensures these special checkout types are properly identified in reporting and analysis, making it easier to understand the context of historical transactions. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
c64aea8fcc
commit
507545734e
|
|
@ -1725,6 +1725,12 @@ sub check_out {
|
||||||
}
|
}
|
||||||
|
|
||||||
# We can allegedly check out, so make it so
|
# 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);
|
my $issue = C4::Circulation::AddIssue(@issue_args);
|
||||||
|
|
||||||
if ($issue) {
|
if ($issue) {
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,10 @@
|
||||||
<span>Unseen renewal</span>
|
<span>Unseen renewal</span>
|
||||||
[% CASE 'SEEN' %]
|
[% CASE 'SEEN' %]
|
||||||
<span>Seen renewal</span>
|
<span>Seen renewal</span>
|
||||||
|
[% CASE 'OFFLINE_CIRCULATION' %]
|
||||||
|
<span>Offline circulation checkout</span>
|
||||||
|
[% CASE 'ILL_CHECKOUT' %]
|
||||||
|
<span>ILL system checkout</span>
|
||||||
[% CASE %]
|
[% CASE %]
|
||||||
<span>[% override | html %]</span>
|
<span>[% override | html %]</span>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
||||||
|
|
@ -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 ) )
|
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.
|
{ ## 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, {
|
push @output, {
|
||||||
issue => 1,
|
issue => 1,
|
||||||
title => $biblio->title,
|
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
|
} 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, {
|
push @output, {
|
||||||
issue => 1,
|
issue => 1,
|
||||||
title => $biblio->title,
|
title => $biblio->title,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue