Description
Jonathan Druart
2013-09-06 09:12:23 UTC
Created attachment 20820 [details] [review] Bug 10833: Multi transport types for advanced notices Test plan: - Choose 2 patrons P1 and P2 - Edit "Patron messaging preferences" and check SMS + email with 2 days in advance for P1 check email with 5 days in advance for P2 - defined a message for the letter code PREDUE for sms and email (tools/letters.pl). - select 2 barcodes (B1, B2). * checkout B1 to P1 with a due date = NOW - 2 days * checkout B2 to P2 with a due date = NOW - 5 days - into the mysql cli, note the value of unsent message: select count(*) from message_queue where status != "send"; - launch the cronjob: perl misc/cronjobs/advance_notices.pl -c - retry the previous sql query, you should have X + 3 unsent messages (depending of current checkouts in your DB!). - view all unsent message: select borrowernumber, letter_code, message_transport_type, content from message_queue where status != "send"; You should see: 2 messages for P1, 1 for sms, 1 for email and the letter code PREDUE 1 message for P2, email and the letter code PREDUE Applying: Bug 9016: DB changes: new table overduerules_transport_types Using index info to reconstruct a base tree... M installer/data/mysql/updatedatabase.pl Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Patch failed at 0001 Bug 9016: DB changes: new table overduerules_transport_types The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". This bug depends on bug9016 which is in status Needs Signoff but the patches for it do not apply cleanly (In reply to I'm just a bot from comment #3) > This bug depends on bug9016 which is in status Needs Signoff but the patches > for it do not apply cleanly It applies cleanly (but 9016 has a conflict on updatedatabase.pl). Created attachment 23901 [details] [review] Bug 10833: Multi transport types for advanced notices Test plan: - Choose 2 patrons P1 and P2 - Edit "Patron messaging preferences" and check SMS + email with 2 days in advance for P1 check email with 5 days in advance for P2 - defined a message for the letter code PREDUE for sms and email (tools/letters.pl). - select 2 barcodes (B1, B2). * checkout B1 to P1 with a due date = NOW - 2 days * checkout B2 to P2 with a due date = NOW - 5 days - into the mysql cli, note the value of unsent message: select count(*) from message_queue where status != "send"; - launch the cronjob: perl misc/cronjobs/advance_notices.pl -c - retry the previous sql query, you should have X + 3 unsent messages (depending of current checkouts in your DB!). - view all unsent message: select borrowernumber, letter_code, message_transport_type, content from message_queue where status != "send"; You should see: 2 messages for P1, 1 for sms, 1 for email and the letter code PREDUE 1 message for P2, email and the letter code PREDUE Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Created attachment 23902 [details] [review] Bug 10833: Enhanced a warning message to include the message transport type in the message. Does not apply on top of 9016. Please rebase. Created attachment 27472 [details] [review] Bug 10833: Multi transport types for advanced notices Test plan: - Choose 2 patrons P1 and P2 - Edit "Patron messaging preferences" and check SMS + email with 2 days in advance for P1 check email with 5 days in advance for P2 - defined a message for the letter code PREDUE for sms and email (tools/letters.pl). - select 2 barcodes (B1, B2). * checkout B1 to P1 with a due date = NOW - 2 days * checkout B2 to P2 with a due date = NOW - 5 days - into the mysql cli, note the value of unsent message: select count(*) from message_queue where status != "send"; - launch the cronjob: perl misc/cronjobs/advance_notices.pl -c - retry the previous sql query, you should have X + 3 unsent messages (depending of current checkouts in your DB!). - view all unsent message: select borrowernumber, letter_code, message_transport_type, content from message_queue where status != "send"; You should see: 2 messages for P1, 1 for sms, 1 for email and the letter code PREDUE 1 message for P2, email and the letter code PREDUE Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Created attachment 27473 [details] [review] Bug 10833: Enhanced a warning message to include the message transport type in the message. Last patches fix conflict with bug 8258. Created attachment 27528 [details] [review] Bug 10833: Multi transport types for advanced notices Test plan: - Choose 2 patrons P1 and P2 - Edit "Patron messaging preferences" and check SMS + email with 2 days in advance for P1 check email with 5 days in advance for P2 - defined a message for the letter code PREDUE for sms and email (tools/letters.pl). - select 2 barcodes (B1, B2). * checkout B1 to P1 with a due date = NOW - 2 days * checkout B2 to P2 with a due date = NOW - 5 days - into the mysql cli, note the value of unsent message: select count(*) from message_queue where status != "send"; - launch the cronjob: perl misc/cronjobs/advance_notices.pl -c - retry the previous sql query, you should have X + 3 unsent messages (depending of current checkouts in your DB!). - view all unsent message: select borrowernumber, letter_code, message_transport_type, content from message_queue where status != "send"; You should see: 2 messages for P1, 1 for sms, 1 for email and the letter code PREDUE 1 message for P2, email and the letter code PREDUE Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 27529 [details] [review] Bug 10833: Enhanced a warning message to include the message transport type in the message. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Can generate this error with a missing notice for sms: No circulation PREDUE letter transported by sms at /usr/share/koha/testclone/C4/Letters.pm line 455. no letter of type 'PREDUE' found. Please see sample_notices.sql at misc/cronjobs/advance_notices.pl line 293. Two warnings are better than zero. But it seems to be redundant :) Just a note: I tested this on top of 9016, 10845 and 10832. Pushed to master. Thanks, Jonathan! (In reply to Galen Charlton from comment #15) > Pushed to master. Thanks, Jonathan! Patch already included in 3.16.x branch |