Bug 30515 - Move Overdue transports to patron messaging preferences
Summary: Move Overdue transports to patron messaging preferences
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: David Gustafsson
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-12 15:47 UTC by Nick Clemens
Modified: 2024-03-21 18:16 UTC (History)
14 users (show)

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


Attachments
Fetch patron specific message preferences for overdue messages and use them instead of patron category level preferences (8.11 KB, patch)
2024-03-20 16:41 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 30515: Move Overdue transports to patron messaging preferences (10.56 KB, patch)
2024-03-20 17:23 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 30515: Move Overdue transports to patron messaging preferences (10.75 KB, patch)
2024-03-20 17:28 UTC, David Gustafsson
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-04-12 15:47:55 UTC
The idea of this bug would be to allow patrons to choose which format they would like to receive their overdues in while maintaining at least one selection as mandatory
Comment 1 Katrin Fischer 2022-04-12 20:29:36 UTC
Some libraries need to send the third notice as print or even all of them. I like the idea of having at least one mandatory, so you can't opt out, but could we also have an option to not have it appear in the messaging preferences?
Comment 2 Nick Clemens 2022-04-20 14:25:39 UTC
Do you mean an option to not have a given transport appear in preferences?
Or an option to not show preferences for ODUE2, and only ODUE1?

I think we envisioned a single preference for overdues - the triggers still controlling which ones we send
Comment 3 Katrin Fischer 2022-04-21 22:40:43 UTC
I'd like an option to not have the overdue notices appear at all or only as read only.

I think a single preference for all overdues notice levels would not work without regressions. At the moment you can set the transport preferences in staff individually for each notice and can even opt to have multiple transports for each (send by email AND print).
Comment 4 Joy Nelson 2022-06-14 16:47:58 UTC
Katrin, and all other interested parties!
We have written the following brief proposal below.  This proposal provides an option for libraries to allow patrons to select preferences for their overdue messages.  We are looking to balance the patron's ability to set a preference with the library's ability to control messaging related to overdues. 

We appreciate everyone's feedback on this proposal:
 

Add two checkboxes to each transport type in the Overdue Triggers matrix. 
   1.  Enabled:  Will the library send a notice in this transport type?
   2. Mandatory: When checked, this transport is the way that this message is sent.  (multiple transport types can be selected) Patron preferences will be ignored in favor of the transport the library has indicated as mandatory.

Add matrix of Overdue Message Preferences in the Patron Message Preference screen.  The matrix will contain the 3 Overdue messages (odue1,odue2,odue3) and patrons will be able to indicate their preferences for receiving these messages.  This matrix will appear on opac and staff side depending on EnhancedMessage System Preference.

Add an additional System preference to control whether patron can edit the Overdue messaging preferences.
  If enabled -- Show a BOLD message that they can choose their preferences but library policies may override their choice (see Mandatory above)
    Patrons will be forced to select at least one transport type.
  If disabled -- Show a read only matrix of the patron's libraries (or default) transport types that are set in Overdue triggers and a note that other library policies may override the patron's libraries settings.
Comment 5 Andrew Fuerste-Henry 2022-09-30 13:52:48 UTC
(In reply to Joy Nelson from comment #4)
> Katrin, and all other interested parties!
> We have written the following brief proposal below.  This proposal provides
> an option for libraries to allow patrons to select preferences for their
> overdue messages.  We are looking to balance the patron's ability to set a
> preference with the library's ability to control messaging related to
> overdues. 
> 
> We appreciate everyone's feedback on this proposal:
>  
> 
> Add two checkboxes to each transport type in the Overdue Triggers matrix. 
>    1.  Enabled:  Will the library send a notice in this transport type?
>    2. Mandatory: When checked, this transport is the way that this message
> is sent.  (multiple transport types can be selected) Patron preferences will
> be ignored in favor of the transport the library has indicated as mandatory.
> 
> Add matrix of Overdue Message Preferences in the Patron Message Preference
> screen.  The matrix will contain the 3 Overdue messages (odue1,odue2,odue3)
> and patrons will be able to indicate their preferences for receiving these
> messages.  This matrix will appear on opac and staff side depending on
> EnhancedMessage System Preference.
> 
> Add an additional System preference to control whether patron can edit the
> Overdue messaging preferences.
>   If enabled -- Show a BOLD message that they can choose their preferences
> but library policies may override their choice (see Mandatory above)
>     Patrons will be forced to select at least one transport type.
>   If disabled -- Show a read only matrix of the patron's libraries (or
> default) transport types that are set in Overdue triggers and a note that
> other library policies may override the patron's libraries settings.

This sounds like a good balance of flexibility and control! +1 and then +1 again for good measure :)
Comment 6 Jonathan Druart 2022-10-14 13:41:57 UTC
I don't think we should hardcode the 3 codes. It will make harder to improve this area (like bug 12771).
Comment 7 Katrin Fischer 2023-10-29 10:01:32 UTC
I think the last bit about the display in the OPAC could maybe be simplified, but I like the optional/mandatory approach.

Right now the notices are hardcoded to 3 levels, we could try to make the code more flexible, but it feels like it might things more complex while there is no development on bug 12771. Maybe easier to do it once it's actually required.
Comment 8 David Gustafsson 2024-03-20 16:40:58 UTC
I'm currently going through our local branches that has not yet been submitted to bugzilla, and we have an implementation for enabling per patron overdue notice messaging preference. This was added before taking part of any of the discussion here and attaching it as is. With regards to the print behavior we added a setting to select whether to always print, print if no other transport is set, or never print. A third possible option could be to fallback to the print setting for the patron category and library. I'm not to familiar with how much flexibility is needed for printing, and the third option seems a little bit overkill, but if there is a use case it could be added.
Comment 9 David Gustafsson 2024-03-20 16:41:26 UTC
Created attachment 163564 [details] [review]
Fetch patron specific message preferences for overdue messages and use them instead of patron category level preferences
Comment 10 David Gustafsson 2024-03-20 17:23:53 UTC
Created attachment 163573 [details] [review]
Bug 30515: Move Overdue transports to patron messaging preferences

Add syspref for using patron specific message preferences for
overdue messages instead of patron category level preferences.

To test:
1) Set UsePatronPreferencesForOverdueNotices "individual patron preference"
2) Enable some transport for a patron in the messaging preferences form
2) Check out an item and set a due date that will result in an overdue notice
4) Run the overdue_notices.pl script
5) Verify that messages has been sent for the selected transport(s)
6) Run gather_print_notices.pl and verify a print notice is generated
7) Set UsePatronPreferencesForOverdueNotices to "when no other transport
   set"
8) Run the overdue_notices.pl and gather_print_notices.pl and verify
   that no print notice is generated
9) Disable all transports for the patron
10) Run the overdue_notices.pl and gather_print_notices.pl and verify
    that print notice is generated
11)  Set UsePatronPreferencesForOverdueNotices to "never"
12) Run the overdue_notices.pl and gather_print_notices.pl and verify
    that no print notice is generated
13) Enable some transport(s) for the patron
14) Run the overdue_notices.pl and gather_print_notices.pl and verify
    that no print notice is generated

Sponsored-by: Gothenburg University Library
Comment 11 David Gustafsson 2024-03-20 17:28:40 UTC
Created attachment 163574 [details] [review]
Bug 30515: Move Overdue transports to patron messaging preferences

Add syspref for using patron specific message preferences for
overdue messages instead of patron category level preferences.

To test:
1) Set UsePatronPreferencesForOverdueNotices to "individual patron preference"
2) Enable some transport for a patron in the messaging preferences form
2) Check out an item and set a due date that will result in an overdue notice
4) Run the overdue_notices.pl script
5) Verify that messages has been sent for the selected transport(s)
6) Run gather_print_notices.pl and verify a print notice is generated
7) Set UsePatronPreferencesForOverdueNotices to "when no other transport
   set"
8) Run the overdue_notices.pl and gather_print_notices.pl and verify
   that no print notice is generated
9) Disable all transports for the patron
10) Run the overdue_notices.pl and gather_print_notices.pl and verify
    that print notice is generated
11)  Set UsePatronPreferencesForOverdueNotices to "never"
12) Run the overdue_notices.pl and gather_print_notices.pl and verify
    that no print notice is generated
13) Enable some transport(s) for the patron
14) Run the overdue_notices.pl and gather_print_notices.pl and verify
    that no print notice is generated
15) Set UsePatronPreferencesForOverdueNotices to "patron category"
16) Run the overdue_notices.pl and gather_print_notices.pl and verify
    the patron category and library setting is used

Sponsored-by: Gothenburg University Library
Comment 12 Lucas Gass 2024-03-21 18:16:12 UTC
Looks promising. 

With this patch applied and UsePatronPreferencesForOverdueNotices set to "individual patron preference" I do not see the Overdue messaging preferences on the patron form. 

Maybe GetMessagingOptions (C4/Members/Messaging.pm) needs to be updated so it can retrieve Overdue1, Overdue2, and Overdue3? 


Thanks for working on this!