To test: 1. Check a thing out to a patron, any patron and any thing. 2. See the message "No patron matched Restriction overridden temporarily" This seems to be a product of 9762. The string also seems to be untranslatable: Bug https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9762#c117
Created attachment 186985 [details] [review] 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
Created attachment 186986 [details] [review] Bug 40866: Make message translatable
Note sure whether that is the best place for that message given that we have to introduce Koha::I18N?
I would like to upload alternate patchs that moves or removes the other variables that were introduced by bug 9762, if that is ok.
Nah, it's too late for that @Michael Hafen. Fixing issues in the original bugs post push to maintenance branches always causes confusion. If the patches in this bug are not sufficient, add more or open a new bug, please :)
I will add a patch to this bug then. I would like these variables to be kept together. Thank you. (In reply to Paul Derscheid from comment #5) > Nah, it's too late for that @Michael Hafen. > Fixing issues in the original bugs post push to maintenance branches always > causes confusion. > If the patches in this bug are not sufficient, add more or open a new bug, > please :)
Created attachment 187063 [details] [review] Bug 40866: Move or remove other variables added with the message
Created attachment 187116 [details] [review] 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.
The message 'Restriction overridden temporarily' is not meant to appear in circulation.pl, but in the Log Viewer (see Bug 9762).