Bug 11561: restore previous behavior of generation of hold print notices
authorOlli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Wed, 15 Jan 2014 14:25:17 +0000 (16:25 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 2 May 2014 20:29:19 +0000 (20:29 +0000)
commit9270f064635ee16910d2a3d1e3e491e6bac22976
tree88368d22141c5d2ff05c187380e0d9fd09c4b6c8
parent6b1c114cc698a2ff944a30eaa367a0c0ce4922a4
Bug 11561: restore previous behavior of generation of hold print notices

This patch prevents duplicate hold available print notices from being
sent and enforces making a print notice if no other transports can be
used.

-------------------------
- REPLICATING THE ISSUE -
-------------------------

1. Set a Patrons "Hold filled"-messaging preference to SMS + Email
2. Remove the SMS number (sms notification number) and all email
   addresses.
3. Make a reservation for this Patron.
4. Check-in the reserved Item.
5. message_queue-table has two generated print notices for the
   Hold_filled event.
   One for both failed message transport types, email and sms.

1. Set a Patrons "Hold filled"-messaging preference to empty, remove all
   checks from boxes.
2. Make a reservation for this Patron
3. Check-in the reserved Item.
4. message_queue-table has no message for the Hold-filled event. This is
   problematic because a Patron should get some kind of a notification
   for a filled Hold.

-----------------------------
- AFTER APPLYING THIS PATCH -
-----------------------------

If all message transport types for "Hold filled" fail, a print notice is
queued in the message_queue table. Only one print message is queued even
if many transports attempts fail.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Reserves.pm