[Bug 28308] New: Select 'Days in advance' = 0 for Advance notice effectively disables PREDUE notices
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Bug ID: 28308 Summary: Select 'Days in advance' = 0 for Advance notice effectively disables PREDUE notices Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Looking at the code below, it seems that on the day an item is due we will only send the DUE notices, predues will not be sent In the advance_notices.pl cron: 276 if ( 0 == $upcoming->{'days_until_due'} ) { 277 # This item is due today. Send an 'item due' message. ... 323 } else { 324 $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $upcoming->{'borrowernumber'}, 325 message_name => 'advance_notice' } ); 326 next UPCOMINGITEM unless $borrower_preferences && exists $borrower_preferences->{'days_in_advance'}; 327 next UPCOMINGITEM unless $borrower_preferences->{'days_in_advance'} == $upcoming->{'days_until_due'}; In this case, allowing the user to choose '0' is effectively disabling the notice. I think we need to remove 0 as an option, and uncheck all transports for patrons who have '0' set for days in advance -- 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=28308 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com, | |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sophie.meynieux@biblibre.co | |m --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Wasn't there a trick here? I cannot remember. But yes that does not make sense to have "advance notice 0 day in advance by email" and to not receive a notification! -- 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=28308 Jacek Ablewicz <ablewicz@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ablewicz@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- How should we fix this? We could remove the 0 or replace it with a "-" or "no email" option, but actually it would not be needed. Having a drop down of 0-19 seems a little arbitrary anyway. Is there a reason we could not change this to be a validated number input field? Then empty would be the default and we could add some validation on it needing to be set when one of the message transports is selected. -- 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=28308 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- 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=28308 hebah@bywatersolutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hebah@bywatersolutions.com --- Comment #3 from hebah@bywatersolutions.com --- Honestly, I would love to see 'days in advance' move to a syspref default that could be superseded by category exceptions. It's entirely too easy to miss a patron category when populating category messaging prefs, especially for libraries with many categories, and that would enable something like 1 being the default value. -- 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=28308 Maude Boudreau <maude.boudreau@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maude.boudreau@collecto.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Anneli Österman <anneli.osterman@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anneli.osterman@koha-suomi. | |fi --- Comment #4 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- We have hidden the 0 from the dropdown for years now with IntranetUserCSS so it would be nice if this was fixed. :) -- 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=28308 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=28308 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187992&action=edit Bug 28308: Remove 0 from "days in advance" for "Advance notice" 0 days in advance means that the notice should not be sent. This patch contains the pl/pm changes: we set to null if 0 is passed, and do not insert a row in borrower_message_transport_preferences Test plan: 0. Do not apply the patches 1. Create some entries with email and days in advance = 0 2. Create some entries with email and days in advance > 0 3. Apply the patches 4. Run the updatedatabase script => The rows in borrower_message_transport_preferences have been removed for days in advance = 0 5. Edit some messaging preferences => 0 has been replace with a blank entry => checkboxes are disabled when blank is selected 6. Save => No new entry in borrower_message_transport_preferences is blank is selected 7. advance_notices.pl still works correctly -- 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=28308 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187993 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187993&action=edit Bug 28308: JS changes -- 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=28308 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187994 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187994&action=edit Bug 28308: DBrev To remove the unnecessary entries from the DB -- 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=28308 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | Keywords|Academy | -- 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=28308 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.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=28308 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187994|0 |1 is obsolete| | --- Comment #8 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191224 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191224&action=edit Bug 28308: DBrev To remove the unnecessary entries from the DB Signed-off-by: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Andrew Fuerste-Henry <andrew@bywatersolutions.com> 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=28308 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187992|0 |1 is obsolete| | --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 192238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192238&action=edit Bug 28308: Remove 0 from "days in advance" for "Advance notice" 0 days in advance means that the notice should not be sent. This patch contains the pl/pm changes: we set to null if 0 is passed, and do not insert a row in borrower_message_transport_preferences Test plan: 0. Do not apply the patches 1. Create some entries with email and days in advance = 0 2. Create some entries with email and days in advance > 0 3. Apply the patches 4. Run the updatedatabase script => The rows in borrower_message_transport_preferences have been removed for days in advance = 0 5. Edit some messaging preferences => 0 has been replace with a blank entry => checkboxes are disabled when blank is selected 6. Save => No new entry in borrower_message_transport_preferences is blank is selected 7. advance_notices.pl still works correctly Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187993|0 |1 is obsolete| | --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 192239 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192239&action=edit Bug 28308: JS changes Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191224|0 |1 is obsolete| | --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 192240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192240&action=edit Bug 28308: DBrev To remove the unnecessary entries from the DB Signed-off-by: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 --- Comment #12 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 --- Comment #13 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 192239 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192239 Bug 28308: JS changes Review of attachment 192239: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=28308&attachment=192239) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc @@ +337,4 @@
[% END %] </tbody> </table> +<script>
Just a friendly reminder that scripts like these should be placed in separate .js files according to JS1 from the coding guidelines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28308 --- Comment #14 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org