Bugzilla – Attachment 90752 Details for
Bug 22566
Stock rotation cronjob reporting has issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22566: Clarify intent of reports and add warnings
Bug-22566-Clarify-intent-of-reports-and-add-warnin.patch (text/plain), 2.39 KB, created by
Martin Renvoize (ashimema)
on 2019-06-18 13:31:21 UTC
(
hide
)
Description:
Bug 22566: Clarify intent of reports and add warnings
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-06-18 13:31:21 UTC
Size:
2.39 KB
patch
obsolete
>From 5abb57f0dd3cf8c2b4034622e4c63185dee6cde4 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 18 Jun 2019 14:24:27 +0100 >Subject: [PATCH] Bug 22566: Clarify intent of reports and add warnings > >--- > misc/cronjobs/stockrotation.pl | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > >diff --git a/misc/cronjobs/stockrotation.pl b/misc/cronjobs/stockrotation.pl >index 5cf6374b12..87d6a9ec59 100755 >--- a/misc/cronjobs/stockrotation.pl >+++ b/misc/cronjobs/stockrotation.pl >@@ -166,6 +166,11 @@ exit 1 unless ($ok); > > $send_email++ if ($send_all); # if we send all, then we must want emails. > >+if ( $send_email && !$admin_email && ($report eq 'full')) { >+ printf("Sending the full report by email requires --admin-email.\n"); >+ exit 1; >+} >+ > =head2 Helpers > > =head3 execute >@@ -441,14 +446,12 @@ sub emit { > # We have a report to send, or we want to send even empty > # reports. > >- # Send to branch >+ # Select email address to send to > my $addressee; > if ( $part->{email_address} ) { > $addressee = $part->{email_address}; > } > elsif ( !$part->{no_branch_email} ) { >- >-#push @emails, "***We tried to send a branch report, but we have no email address for this branch.***\n\n"; > $addressee = C4::Context->preference('KohaAdminEmailAddress') > if ( C4::Context->preference('KohaAdminEmailAddress') ); > } >@@ -476,17 +479,15 @@ sub emit { > } > ) > or warn >-"can't enqueue letter $part->{letter} for $params->{admin_email}"; >+ "can't enqueue letter $part->{letter} for $params->{admin_email}"; > } > } > else { >- $addressee ||= >- defined( $params->{admin_email} ) >- ? $params->{admin_email} . "\n" >- : 'No recipient found' . "\n"; > my $email = > "-------- Email message --------" . "\n\n"; > $email .= "To: $addressee\n"; >+ $email .= "Cc: " . $params->{admin_email} . "\n" >+ if ( $params->{admin_email} ); > $email .= "Subject: " > . $part->{letter}->{title} . "\n\n" > . $part->{letter}->{content}; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22566
:
86923
|
90421
|
90422
|
90423
|
90433
|
90434
|
90435
|
90742
|
90743
|
90744
|
90745
|
90746
|
90747
|
90748
|
90749
|
90750
|
90751
|
90752
|
90753
|
90989
|
90990
|
90991
|
90992
|
90993
|
90994
|
90995