Summary: | Weird and untranslatable message appears every time something is checked out | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
Component: | Staff interface | Assignee: | Hammat wele <hammat.wele> |
Status: | Needs Signoff --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, gmcharlt, hammat.wele, michael.hafen, paul.derscheid, philippe.blouin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 9762 | ||
Bug Blocks: | |||
Attachments: |
Bug 40866: Fix incorrect display of override message on normal checkouts
Bug 40866: Make message translatable Bug 40866: Move or remove other variables added with the message Bug 40866: Fix incorrect display of override message on normal checkouts |
Description
Lucas Gass (lukeg)
2025-09-23 19:35:11 UTC
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. |