[Koha-bugs] [Bug 12922] Do not DIE the advance_notices.pl -cronjob if "no letter of * type" is found

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 2 16:22:02 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12922

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34869|0                           |1
        is obsolete|                            |

--- Comment #7 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 34893
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34893&action=edit
[PASSED QA] Bug 12922 - Do not DIE the advance_notices.pl -cronjob if no letter
of type is found!!

We failed to deliver advance_notices because a template for sms's is undefined,
because we don't support
sending sms' as advance_notice.
This crashed the cronjob because digests are set to die instead of the warn
used in non-digest.
And we get angry customers asking for compensation!

This patch replaces the die with warn.

TEST PREPARATION:

0. Edit the ODUEDGST letter, find an undefined letter for any trasport type.

TEST PLAN:

1. Find a borrower and from the messaging preferences set the "Advance notice"
transport type to
   the undefined digest. Set the "Days in Advance" to 1.
2. Check-out something for that borrower and set the due date for tomorrow.
3. Run "misc/cronjobs/advance_notices.pl -c -n -v" from the terminal.
4. BEFORE THIS PATCH: You get an error
   "No circulation PREDUEDGST letter transported by sms at
/home/koha/kohaclone/C4/Letters.pm line 609."
   and the script dies.
4. AFTER THIS PATCH: You get an error
   "No circulation PREDUEDGST letter transported by sms at
/home/koha/kohaclone/C4/Letters.pm line 609."
   but the script keep on going!

Signed-off-by: Jonathan Druart <jonathan.druart at biblibre.com>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list