Bug 39781

Summary: Cannot limit by library when creating custom patron email sent via patron details page
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: blawlor, jheltibridle, kch-tr.lhl-consortium
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: 29393    
Bug Blocks:    

Description Andrew Fuerste-Henry 2025-04-29 18:44:49 UTC
To recreate:
1 - create a new notice in module "Patrons (custom message)"
2 - limit your notice to a library
3 - give your notice content for the email format
4 - go to a patron record, select Add Message
5 - confirm the notice you created appears as an option regardless of whether or not you're logged in at the branch you selected in step 2
6 - confirm the Save button fails to enqueue your notice, regardless of logged-in branch

We don't pass any branchcode along with the borrowernumber and letter_code when enqueueing this, so it fails if the notice template is limited to a branch.

We should send the logged-in library when enqueueing the notice.
We should also high the notice from the Add Message form if the user is not logged in at the correct branch.
Comment 1 kch-tr.lhl-consortium@nhs.net 2025-06-13 08:33:55 UTC
Confirming that this is the case. Have tried unsuccessfully to limit a new notice using the Patrons (custom message) to an individual branch and then send to a user using the Add message feature. This type of functionality is essential for consortia entities.