Bugzilla – Attachment 187116 Details for
Bug 40866
Weird and untranslatable message appears every time something is checked out
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.52 KB, created by
Hammat wele
on 2025-09-30 16:45:40 UTC
(
hide
)
Description:
Bug 40866: Fix incorrect display of override message on normal checkouts
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-09-30 16:45:40 UTC
Size:
4.52 KB
patch
obsolete
>From 007cd1a54881a864903ff7e7b13f721eddc15e9c 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. >--- > 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 caa743afa22..7c1bbc95d60 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; >@@ -327,7 +326,6 @@ if ($patron) { > # > # > my $message; >-my @message; > > if ( @$barcodes && $op eq 'cud-checkout' ) { > my $checkout_infos; >@@ -548,7 +546,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, >@@ -564,34 +563,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.34.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 40866
:
186985
|
186986
|
187063
| 187116