Bugzilla – Attachment 187677 Details for
Bug 40866
Corrections to override logging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40866: Fix incorrect display of override message on normal checkouts
Bug-40866-Fix-incorrect-display-of-override-messag.patch (text/plain), 4.65 KB, created by
Andrew Fuerste-Henry
on 2025-10-09 15:21:11 UTC
(
hide
)
Description:
Bug 40866: Fix incorrect display of override message on normal checkouts
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2025-10-09 15:21:11 UTC
Size:
4.65 KB
patch
obsolete
>From c16acced6dbba9a6058a6cd633f7c16836e33c8c Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Tue, 30 Sep 2025 16:37:45 +0000 >Subject: [PATCH] Bug 40866: Fix incorrect display of override message on > normal checkouts > >- The message 'No patron matched Restriction overridden temporarily' was appearing on every checkout, even when no restriction override occurred. >- This was caused by the message being set unconditionally after AddIssue in circ/circulation.pl. >- The message should not appear in circulation.pl, but in the Log Viewer. > >To test: > >1. Check out an item to a patron normally. >2. 'Restriction overridden temporarily' message appears. >3. Apply patches >4. Repeat 1. > ---> Verify that no 'Restriction overridden temporarily' message appears. >5. Check out an item that requires an override (e.g., not for loan item with AllowNotForLoanOverride enabled). > ---> Verify that no 'Restriction overridden temporarily' message appears. >6. Go to Tool -> Log viewer. >7. Enter the borrowernumber in Object field and submit. > ---> Verify that the 'Restriction overridden temporarily' message is logged correctly. > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> >--- > circ/circulation.pl | 33 ++----------------- > .../prog/en/includes/action-logs.inc | 2 ++ > 2 files changed, 4 insertions(+), 31 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 45bdd5c8645..01209d5eef0 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -39,7 +39,6 @@ use C4::Members; > use C4::Biblio qw( TransformMarcToKoha ); > use C4::Search qw( new_record_from_zebra ); > use C4::Reserves qw( ModReserveAffect ); >-use C4::Log qw( logaction ); > use Koha::Holds; > use C4::Context; > use CGI::Session; >@@ -328,7 +327,6 @@ if ($patron) { > # > # > my $message; >-my @message; > > if ( @$barcodes && $op eq 'cud-checkout' ) { > my $checkout_infos; >@@ -551,7 +549,8 @@ if ( @$barcodes && $op eq 'cud-checkout' ) { > if ( my $booked = $needsconfirmation->{BOOKED_EARLY} // $alerts->{BOOKED} ) { > $datedue = $booked->end_date; > } >- $needsconfirmation->{'DEBT'} = $needsconfirmationDEBT if ($debt_confirmed); >+ $needsconfirmation->{'DEBT'} = $needsconfirmationDEBT if ($debt_confirmed); >+ $needsconfirmation->{'OVERRIDDEN'} = $issueconfirmed if ($issueconfirmed); > my $issue = AddIssue( > $patron, $barcode, $datedue, > $cancelreserve, >@@ -567,34 +566,6 @@ if ( @$barcodes && $op eq 'cud-checkout' ) { > } > ); > $template_params->{issue} = $issue; >- >- my $borrower = $patron; >- my $borrowernumber = $patron->borrowernumber; >- my $user = C4::Context->userenv->{number}; >- my $branchcode = C4::Context->userenv->{branch}; >- $message = "Restriction overridden temporarily"; >- @message = ("Restriction overridden temporarily"); >- >- if ($issueconfirmed) { >- my $infos = ( >- { >- message => \@message, >- borrowernumber => $borrowernumber, >- barcode => $barcode, >- manager_id => $user, >- branchcode => $branchcode, >- } >- ); >- >- my $json_infos = JSON->new->utf8->pretty->encode($infos); >- $json_infos =~ s/"/'/g; >- >- logaction( >- "CIRCULATION", "ISSUE", >- $borrower->{'borrowernumber'}, >- $json_infos, >- ) if C4::Context->preference("IssueLog"); >- } > $session->clear('auto_renew'); > $inprocess = 1; > } >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 6b0deca6366..774e05477f6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >@@ -247,6 +247,8 @@ > <span>Override Renew hold for another</span> > [% CASE 'TOO_MUCH' %] > <span>Override auto-renew too much owing restriction</span> >+ [% CASE 'OVERRIDDEN' %] >+ <span>Restriction overridden temporarily</span> > [% CASE %] > <span>[% override | html %]</span> > [% END %] >-- >2.39.5
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 40866
:
186985
|
186986
|
187063
|
187116
|
187627
|
187628
|
187629
|
187630
|
187631
|
187632
|
187633
|
187675
|
187676
|
187677
|
187678
|
187679
|
187680
|
187681
|
187682
|
187683
|
187684
|
187685
|
187686
|
187687
|
187688
|
187689
|
187690
|
187691
|
187692
|
187693
|
187694
|
187707
|
187725