[Bug 38095] New: Custom patron messages should have access to information about the logged-in library they were sent from
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Bug ID: 38095 Summary: Custom patron messages should have access to information about the logged-in library they were sent from Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: emily.lamancusa@montgomerycountymd.gov Reporter: emily.lamancusa@montgomerycountymd.gov QA Contact: testopia@bugs.koha-community.org Depends on: 29393 Bug 29393 added the ability to define custom notices that could be sent from the patron account page. It would be useful if these notices had access to information about the logged-in library from which the notice was triggered. For example, we'd like to use this feature to add an email template for notifying a patron that a lost library card was found and turned in to the library. That notice should include which branch found the card and triggered the notice, which may not be the patron's home library. 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |januszop@gmail.com --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- +1 I would need it too. It seems that for the branch it would be enough to do this: diff --git a/circ/add_message.pl b/circ/add_message.pl index 08cf1e4d9f..3e6eb498d7 100755 --- a/circ/add_message.pl +++ b/circ/add_message.pl @@ -81,7 +81,7 @@ if ( $op eq 'cud-edit_message' && $message_id ) { module => 'add_message', letter_code => $letter_code, lang => $patron->lang, - tables => { 'borrowers' => $borrowernumber }, + tables => { 'borrowers' => $borrowernumber, 'branches' => $branchcode }, ); } Will you prepare the patch, Emily (as assignee)? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pmis@mnw.art.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 --- Comment #2 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 172668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172668&action=edit Bug 38095: Include logged-in branch in custom patron message To test: 1. Create a new notice template for a custom patron message i. Go to Tools > Notices and Slips ii. Create a new notice and choose Patrons (custom message) module iii. Add the following text to the email notice: You have a new notification from [% branches.branchname %] iv. Fill in other fields and save 2. Find a patron and go to their details page 3. Send the custom notice you just created i. Click Add message ii. Under "add a message for", select the email option iii. Under "Patron notice", select the notice you just created iv. Click "Save" 4. Open the patron's notices tab and look at the notice that was sent --> The branch name is left blank 5. Apply patch and refresh the patron page 6. Repeat steps 3-4 --> The branch code is now included in the notice -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Janusz Kaczmarek <januszop@gmail.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=38095 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172668|0 |1 is obsolete| | --- Comment #3 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 172669 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172669&action=edit Bug 38095: Include logged-in branch in custom patron message To test: 1. Create a new notice template for a custom patron message i. Go to Tools > Notices and Slips ii. Create a new notice and choose Patrons (custom message) module iii. Add the following text to the email notice: You have a new notification from [% branches.branchname %] iv. Fill in other fields and save 2. Find a patron and go to their details page 3. Send the custom notice you just created i. Click Add message ii. Under "add a message for", select the email option iii. Under "Patron notice", select the notice you just created iv. Click "Save" 4. Open the patron's notices tab and look at the notice that was sent --> The branch name is left blank 5. Apply patch and refresh the patron page 6. Repeat steps 3-4 --> The branch code is now included in the notice Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Anneli Österman <anneli.osterman@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |anneli.osterman@koha-suomi. | |fi --- Comment #4 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- I tested this in sandbox and it kind of works but not with [% branches.branchname %] as instructed. If you want to add branch name, you had to use <<branches.branchname>> instead. Is that how it was intended to work? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 --- Comment #5 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Anneli Österman from comment #4)
I tested this in sandbox and it kind of works but not with [% branches.branchname %] as instructed. If you want to add branch name, you had to use <<branches.branchname>> instead. Is that how it was intended to work?
I can confirm, that's true. But this seems to be another issue. [% borrowers.firstname %] does not work as well--seems to be a be a more general problem with letter templates interpretation (at least for custom patron messages). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 --- Comment #6 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Janusz Kaczmarek from comment #5)
(In reply to Anneli Österman from comment #4)
I tested this in sandbox and it kind of works but not with [% branches.branchname %] as instructed. If you want to add branch name, you had to use <<branches.branchname>> instead. Is that how it was intended to work?
I can confirm, that's true. But this seems to be another issue. [% borrowers.firstname %] does not work as well--seems to be a be a more general problem with letter templates interpretation (at least for custom patron messages).
Problem explained: for [% %] placeholders singular form should be used--it should be: [% branch.branchname %] [% borrower.firstname %] etc. whereas for << >> form the table name (usually plural: branches.column, borrowers.column etc.) is to be used. Emily, would you correct the test plan please? (The patch itself is fine). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 --- Comment #7 from Janusz Kaczmarek <januszop@gmail.com> --- And of course comment #6 applies to all letter templates, not only to patron custom messages. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Anneli Österman <anneli.osterman@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #8 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- Ahh, yes. It works with [% branch.branchname %]. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172669|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 178469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178469&action=edit Bug 38095: Include logged-in branch in custom patron message To test: 1. Create a new notice template for a custom patron message i. Go to Tools > Notices and Slips ii. Create a new notice and choose Patrons (custom message) module iii. Add the following text to the email notice: You have a new notification from [% branches.branchname %] iv. Fill in other fields and save 2. Find a patron and go to their details page 3. Send the custom notice you just created i. Click Add message ii. Under "add a message for", select the email option iii. Under "Patron notice", select the notice you just created iv. Click "Save" 4. Open the patron's notices tab and look at the notice that was sent --> The branch name is left blank 5. Apply patch and refresh the patron page 6. Repeat steps 3-4 --> The branch code is now included in the notice Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.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=38095 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement allows release notes| |branch information to be | |included in predefined | |notices templates for the | |`Patrons (custom message)` | |module, which defines | |notices that can be sent to | |patrons by clicking the | |"Add Message" button on the | |patron account. These | |notices can now use the | |`branch` tag to access | |information about the | |branch the staff member is | |logged into at the time | |they send the message. For | |example: `[% | |branch.branchname %]` - the | |logged-in branch's name, | |`[% branch.branchaddress1 | |%]` - the logged-in | |branch's address, etc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable CC| |fridolin.somers@biblibre.co | |m Version(s)|25.05.00 |25.05.00,24.11.08 released in| | --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Small useful enhancement, Pushed to 24.11.x for 24.11.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38095 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #12 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org