[Bug 39781] New: Cannot limit by library when creating custom patron email sent via patron details page
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Bug ID: 39781 Summary: Cannot limit by library when creating custom patron email sent via patron details page Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Depends on: 29393 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. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29393 [Bug 29393] Ability to send emails from patron details page -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Juliet Heltibridle <jheltibridle@rcplib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jheltibridle@rcplib.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 kch-tr.lhl-consortium@nhs.net <kch-tr.lhl-consortium@nhs.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kch-tr.lhl-consortium@nhs.n | |et --- Comment #1 from kch-tr.lhl-consortium@nhs.net <kch-tr.lhl-consortium@nhs.net> --- 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #2 from Christopher Brannon <cbrannon@cdalibrary.org> --- Would also like the ability to have notices available for selected libraries. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m Assignee|koha-bugs@lists.koha-commun |lisette@bywatersolutions.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 195369 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195369&action=edit Bug 39781: Allow limiting of custom message notices by library To test The following should work with either email or SMS notices sent from the Add Message button in a patron record 1 - create a notice in module Patrons (custom message) for all libraries 2 - create a notice in module Patrons (custom message) for Centerville 3 - while logged in at Centerville, confirm you can see and enqueue your all libraries message 4 - while logged in at Centerville, confirm you can see but cannot successfully enqueue your Centerville message 5 - while logged in at Fairfield, confirm you can see but cannot successfully enqueue your Centerville message 6 - apply patch, restart_all 7 - while logged in at Fairfield, confirm you can see and enqueue your all libraries message 8 - while logged in at Fairfield, confirm you cannot see your Centerville message 9 - while logged in at Centervielle, confirm you can see and enqueue your Centerville message -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|lisette@bywatersolutions.co |andrew@bywatersolutions.com |m | Depends on| |42083 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42083 [Bug 42083] Email and SMS messages from patron record should have distinct permissions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch updates the Add release notes| |Message interface in the | |patron record such that the | |dropdown for selecting a | |notice template when | |sending email or SMS | |messages will only list | |notices for all libraries | |or for the user's logged-in | |library. Messages using a | |template for a specific | |library will now enqueue | |successfully. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 195479 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195479&action=edit Bug 39781: Add POD coverage -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195369|0 |1 is obsolete| | --- Comment #5 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 195505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195505&action=edit Bug 39781: Allow limiting of custom message notices by library To test The following should work with either email or SMS notices sent from the Add Message button in a patron record 1 - create a notice in module Patrons (custom message) for all libraries 2 - create a notice in module Patrons (custom message) for Centerville 3 - while logged in at Centerville, confirm you can see and enqueue your all libraries message 4 - while logged in at Centerville, confirm you can see but cannot successfully enqueue your Centerville message 5 - while logged in at Fairfield, confirm you can see but cannot successfully enqueue your Centerville message 6 - apply patch, restart_all 7 - while logged in at Fairfield, confirm you can see and enqueue your all libraries message 8 - while logged in at Fairfield, confirm you cannot see your Centerville message 9 - while logged in at Centervielle, confirm you can see and enqueue your Centerville message Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195479|0 |1 is obsolete| | --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 195506 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195506&action=edit Bug 39781: Add POD coverage Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Sponsorship status|--- |Unsponsored Patch complexity|--- |Small patch QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195505|0 |1 is obsolete| | Attachment #195506|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195879&action=edit Bug 39781: Allow limiting of custom message notices by library To test The following should work with either email or SMS notices sent from the Add Message button in a patron record 1 - create a notice in module Patrons (custom message) for all libraries 2 - create a notice in module Patrons (custom message) for Centerville 3 - while logged in at Centerville, confirm you can see and enqueue your all libraries message 4 - while logged in at Centerville, confirm you can see but cannot successfully enqueue your Centerville message 5 - while logged in at Fairfield, confirm you can see but cannot successfully enqueue your Centerville message 6 - apply patch, restart_all 7 - while logged in at Fairfield, confirm you can see and enqueue your all libraries message 8 - while logged in at Fairfield, confirm you cannot see your Centerville message 9 - while logged in at Centervielle, confirm you can see and enqueue your Centerville message Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195880&action=edit Bug 39781: Add POD coverage Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195881 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195881&action=edit Bug 39781: (QA follow-up) Fix crashes, dead code and add tests - Fix potential crash when C4::Context->userenv returns undef: use the established ternary guard pattern used throughout other TT plugins (AuthorisedValues, Branches, Desks, etc.) - Remove dead second argument passed to GetLettersAvailableForALibrary, which only accepts one argument; the group_by/columns/order_by hashref was silently dropped - Fix typo "librries" -> "libraries" in GetByModuleForLibrary POD - Update POD example to use 'add_message' module matching actual usage - Add test coverage for GetByModuleForLibrary, verifying that a user logged in to a branch sees branch-specific and all-libraries notices, while users at other branches see only all-libraries notices Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks for all the hard work! Pushed to main for the next 26.05.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.03 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 --- Comment #11 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196187&action=edit Bug 39781: (RM follow-up) Fix wrong mock_userenv key in test mock_userenv expects 'branchcode' but the test was passing 'branch', causing the branchcode to fall through to the 'Branch4T' default and the branch-specific notice lookup to never match. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39781 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |Laura.escamilla@bywatersolu | |tions.com --- Comment #13 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This patch series does not apply cleanly to 25.05.x. git bz apply 39781 failed on the first patch (“Bug 39781: Allow limiting of custom message notices by library”), so I was unable to complete backport testing. If it’s updated for 25.05.x compatibility, I’d be happy to re-test. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org