From b85ba41c40b99e1389b89b77dbfbf987fbc7a460 Mon Sep 17 00:00:00 2001 From: Paul Derscheid Date: Fri, 26 Sep 2025 15:15:54 +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 fix moves the message assignment inside the if ($issueconfirmed) block, ensuring it only displays when an override is actually confirmed. To test: 1. Check out an item to a patron normally. 2. "Restriction overridden temporarily" message appears. 3. Apply patches 4. Repeat 1. 5. Verify that no "Restriction overridden temporarily" message appears. 6. Check out an item that requires an override (e.g., not for loan item with AllowNotForLoanOverride enabled). 7. Confirm the override in the UI. 8. Verify that the "Restriction overridden temporarily" message now appears. 9. Sign-off --- circ/circulation.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index caa743afa22..1c67cca81ae 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -569,10 +569,11 @@ if ( @$barcodes && $op eq 'cud-checkout' ) { 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) { + $message = "Restriction overridden temporarily"; + @message = ("Restriction overridden temporarily"); + my $infos = ( { message => \@message, -- 2.39.5