Koha-clms/C4/Members
Jonathan Druart 167758957d
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2ad74b63c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
..
Messaging.pm Bug 28308: Remove 0 from "days in advance" for "Advance notice" 2026-03-14 12:21:06 +00:00
Statistics.pm Bug 40680: Move EXPORT_OK right after Modern::Perl 2025-12-01 08:33:56 -07:00