Bug 40866 - Weird and untranslatable message appears every time something is checked out
Summary: Weird and untranslatable message appears every time something is checked out
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Hammat wele
QA Contact: Testopia
URL:
Keywords:
Depends on: 9762
Blocks:
  Show dependency treegraph
 
Reported: 2025-09-23 19:35 UTC by Lucas Gass (lukeg)
Modified: 2025-09-30 16:46 UTC (History)
6 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40866: Fix incorrect display of override message on normal checkouts (1.99 KB, patch)
2025-09-26 16:08 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 40866: Make message translatable (1.15 KB, patch)
2025-09-26 16:08 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 40866: Move or remove other variables added with the message (2.02 KB, patch)
2025-09-29 17:31 UTC, Michael Hafen
Details | Diff | Splinter Review
Bug 40866: Fix incorrect display of override message on normal checkouts (4.52 KB, patch)
2025-09-30 16:45 UTC, Hammat wele
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2025-09-23 19:35:11 UTC
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
Comment 1 Paul Derscheid 2025-09-26 16:08:30 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
Comment 2 Paul Derscheid 2025-09-26 16:08:32 UTC
Created attachment 186986 [details] [review]
Bug 40866: Make message translatable
Comment 3 Paul Derscheid 2025-09-26 16:09:24 UTC
Note sure whether that is the best place for that message given that we have to introduce Koha::I18N?
Comment 4 Michael Hafen 2025-09-29 17:16:39 UTC
I would like to upload alternate patchs that moves or removes the other variables that were introduced by bug 9762, if that is ok.
Comment 5 Paul Derscheid 2025-09-29 17:24:13 UTC
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 :)
Comment 6 Michael Hafen 2025-09-29 17:26:48 UTC
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 :)
Comment 7 Michael Hafen 2025-09-29 17:31:42 UTC
Created attachment 187063 [details] [review]
Bug 40866: Move or remove other variables added with the  message
Comment 8 Hammat wele 2025-09-30 16:45:40 UTC
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.
Comment 9 Hammat wele 2025-09-30 16:45:57 UTC
The message 'Restriction overridden temporarily' is not meant to appear in circulation.pl, but in the Log Viewer (see Bug 9762).