Bug 12426: Allow resending of messages from the notices tab in the patron account
authorLari Taskula <larit@student.uef.fi>
Thu, 3 Sep 2015 11:42:02 +0000 (14:42 +0300)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 3 Mar 2016 20:16:06 +0000 (20:16 +0000)
commit05ea6ba1a87ec74ac3d47aebcc177c454448bcda
tree223f4ce97a06e550bb2929055609ff5707aaad01
parent256785f5db4ae2ad45de2b3658ce25d462687164
 Bug 12426: Allow resending of messages from the notices tab in the patron account

This patch adds a link 'Resend' under a notice in 'failed' status
in the Patron's Notices tab.

By clicking the link, we will request notices.pl with parameter
"resendnotice=XXXXX" where XXXXX is message_id. In notices.pl,
we then check whether the given message is actually in 'failed'
status. If so, we use the C4::Letters::ResendMessage(123) to
change the status of the message into 'pending'. This way it
will be processed again by the cronjob process_message_queue.pl.

To test, find/create a Patron that has failed notices in message_queue:
1. Enable EnchancedMessagingPreferences system preference
2. Go to Patrons -> Notices
3. In the Notice column, click the title of the failed message
4. Observe that there is nothing for resending the failed message
5. Apply patch.
6. Reload Notices page and repeat step 3
7. Observe that there is now a link "Resend" in the Status-column
8. Click Resend
9. Observe that the message gets into 'pending' status

Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
C4/Letters.pm
koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
members/notices.pl
t/db_dependent/Letters.t