Bugzilla – Attachment 190626 Details for
Bug 41358
action logs info column should always store JSON
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41358: Log forced overrides for offline and ILL checkouts
93f2aaa.patch (text/plain), 4.12 KB, created by
Martin Renvoize (ashimema)
on 2025-12-18 15:58:26 UTC
(
hide
)
Description:
Bug 41358: Log forced overrides for offline and ILL checkouts
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-12-18 15:58:26 UTC
Size:
4.12 KB
patch
obsolete
>From 93f2aaa676406953b7f56f35b24e52a0f0f976f9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Thu, 18 Dec 2025 14:52:26 +0000 >Subject: [PATCH] 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/> >--- > Koha/ILL/Request.pm | 2 ++ > .../intranet-tmpl/prog/en/includes/action-logs.inc | 4 ++++ > offline_circ/process_koc.pl | 10 ++++++++-- > 3 files changed, 14 insertions(+), 2 deletions(-) > >diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm >index 5e76fc5889e..b561e24c33d 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -1695,6 +1695,8 @@ sub check_out { > } > > # We can allegedly check out, so make it so >+ # Mark as ILL checkout in the logs to track system-initiated checkouts >+ push @issue_args, undef, undef, { 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 b863662511d..898d094655a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >@@ -259,6 +259,10 @@ > <span>Unseen renewal</span> > [% CASE 'SEEN' %] > <span>Seen renewal</span> >+ [% CASE 'OFFLINE_CIRCULATION' %] >+ <span>Offline circulation checkout</span> >+ [% CASE 'ILL_CHECKOUT' %] >+ <span>ILL system checkout</span> > [% CASE %] > <span>[% override | html %]</span> > [% END %] >diff --git a/offline_circ/process_koc.pl b/offline_circ/process_koc.pl >index 36bed2d1486..5fecdf8b9b1 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, >-- >2.52.0 >
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 41358
:
190624
|
190625
| 190626 |
190627