[Bug 30076] New: Add ability to check patron messaging preferences from a notice
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Bug ID: 30076 Summary: Add ability to check patron messaging preferences from a notice Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Some libraries want to be able to use a patron's messaging preferences to conditionally change the contents of a notice depending on the patron's other messaging preference. For example, a library has requested to have the note on the hold slip if the patron has requested phone messages for waiting holds. This really only entails adding a method to the Koha::Patron class to allow this type of looking. -- 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=30076 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=30076 Kyle M Hall <kyle@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=30076 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 130458 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130458&action=edit Bug 30076: Add ability to check patron messaging preferences from a notice Some libraries want to be able to use a patron's messaging preferences to conditionally change the contents of a notice depending on the patron's other messaging preference. For example, a library has requested to have the note on the hold slip if the patron has requested phone messages for waiting holds. This really only entails adding a method to the Koha::Patron class to allow this type of looking. Test plan: 1) Apply this patch 2) Enable item checkout notices for a patron for email, but not sms 3) Include the following in the notice: TEST1: [% patron.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'email' }) %] <br/> TEST2: [% patron.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'sms' }) %] 4) Generate a checkout and notice for that patron 5) Note the generated notice has a 1 for TEST1, but not for TEST2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 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=30076 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130458|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 130459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130459&action=edit Bug 30076: Add ability to check patron messaging preferences from a notice Some libraries want to be able to use a patron's messaging preferences to conditionally change the contents of a notice depending on the patron's other messaging preference. For example, a library has requested to have the note on the hold slip if the patron has requested phone messages for waiting holds. This really only entails adding a method to the Koha::Patron class to allow this type of looking. Test plan: 1) Apply this patch 2) Enable item checkout notices for a patron for email, but not sms 3) Include the following in the notice: TEST1: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'email' }) %] <br/> TEST2: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'sms' }) %] 4) Generate a checkout and notice for that patron 5) Note the generated notice has a 1 for TEST1, but not for TEST2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Lucas Gass <lucas@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=30076 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130459|0 |1 is obsolete| | --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 130468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130468&action=edit Bug 30076: Add ability to check patron messaging preferences from a notice Some libraries want to be able to use a patron's messaging preferences to conditionally change the contents of a notice depending on the patron's other messaging preference. For example, a library has requested to have the note on the hold slip if the patron has requested phone messages for waiting holds. This really only entails adding a method to the Koha::Patron class to allow this type of looking. Test plan: 1) Apply this patch 2) Enable item checkout notices for a patron for email, but not sms 3) Include the following in the notice: TEST1: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'email' }) %] <br/> TEST2: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'sms' }) %] 4) Generate a checkout and notice for that patron 5) Note the generated notice has a 1 for TEST1, but not for TEST2 Signed-off-by: Lucas Gass <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=30076 --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- This is cool. It also works well in other notices with different message_names. I tried: Hold_filled Item_check-in Item_checkout Auto_renewal Hold_reminder Tested in these notices: CHECKOUT CHECKIN HOLD_SLIP -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply Keywords| |Manual, | |release-notes-needed --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It looks like the recalls code interfered here a bit, possibly an easy fix: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 30076: Add ability to check patron messaging preferences from a notice Using index info to reconstruct a base tree... M Koha/Patron.pm Falling back to patching base and 3-way merge... Auto-merging Koha/Patron.pm CONFLICT (content): Merge conflict in Koha/Patron.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 30076: Add ability to check patron messaging preferences from a notice hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-30076-Add-ability-to-check-patron-messaging-pr-Kjd5sQ.patch My only other concern here would be documentation. Maybe we could at least at a note about this to the wiki pages for TT notices for now, so we got a starting point for more/better documentation later. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130468|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 132324 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132324&action=edit Bug 30076: Add ability to check patron messaging preferences from a notice Some libraries want to be able to use a patron's messaging preferences to conditionally change the contents of a notice depending on the patron's other messaging preference. For example, a library has requested to have the note on the hold slip if the patron has requested phone messages for waiting holds. This really only entails adding a method to the Koha::Patron class to allow this type of looking. Test plan: 1) Apply this patch 2) Enable item checkout notices for a patron for email, but not sms 3) Include the following in the notice: TEST1: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'email' }) %] <br/> TEST2: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'sms' }) %] 4) Generate a checkout and notice for that patron 5) Note the generated notice has a 1 for TEST1, but not for TEST2 Signed-off-by: Lucas Gass <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=30076 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement gives release notes| |notices access to a | |patron's messaging | |preferences. For example, a | |hold slip could contain a | |line if the patron has | |requested SMS notifications | |for waiting holds, or | |perhaps phone | |notifications. The format | |for this new method is as | |follows: [% | |patron.has_messaging_prefer | |ence({ message_name => | |'Item_Checkout', | |message_transport_type => | |'email' }) %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Kyle M Hall <kyle@bywatersolutions.com> 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=30076 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132324|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 132374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132374&action=edit Bug 30076: Add ability to check patron messaging preferences from a notice Some libraries want to be able to use a patron's messaging preferences to conditionally change the contents of a notice depending on the patron's other messaging preference. For example, a library has requested to have the note on the hold slip if the patron has requested phone messages for waiting holds. This really only entails adding a method to the Koha::Patron class to allow this type of looking. Test plan: 1) Apply this patch 2) Enable item checkout notices for a patron for email, but not sms 3) Include the following in the notice: TEST1: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'email' }) %] <br/> TEST2: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'sms' }) %] 4) Generate a checkout and notice for that patron 5) Note the generated notice has a 1 for TEST1, but not for TEST2 Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Great :) This can be useful in other places -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com --- Comment #10 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- For "real life" example in TT https://wiki.koha-community.org/wiki/Notices_and_Slips_Library#Hold_Slip_-_P... -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org