Bug 7701: Error when sending serial alerts
Probably due to bug 6875, C4::Letters is no longer used by C4::Serials, so that when SendAlerts is called (exactly when this happens is a mystery to me), you will get an error. Adding a "require C4::Letters;" and prefixing SendAlerts to C4::Letters:: should fix it. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Patch fixes the perl error. Steps to reproduce: 1) Create a subscription and set patron notification to "Routling list" - this is necessary, so that a link to email notifications shows up in the OPAC. 2) Search for the serial record in the OPAC and click on the more details view from the subscriptions tab. Subscribe to email notifications. 3) Go back into the serials module and receive and issue for the serial. Before the patch a nasty perl error will be shown, after the patch receiving works. I couldn't confirm that the email was sent out with my setup, but this patch certainly fixes serial receive. [Update 2011-02-29] Fixed the typo and retested. Looks good, but couldn't check if the mail was actually sent. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
937480abe0
commit
98c59fc357
1 changed files with 2 additions and 1 deletions
|
@ -1073,7 +1073,8 @@ sub ModSerialStatus {
|
|||
|
||||
# check if an alert must be sent... (= a letter is defined & status became "arrived"
|
||||
if ( $val->{letter} && $status == 2 && $oldstatus != 2 ) {
|
||||
SendAlerts( 'issue', $val->{subscriptionid}, $val->{letter} );
|
||||
require C4::Letters;
|
||||
C4::Letters::SendAlerts( 'issue', $val->{subscriptionid}, $val->{letter} );
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue