Bugzilla – Attachment 72377 Details for
Bug 19620
Allow skipping of patrons with valid emails for Talking Tech
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19620: Allow skipping of patrons with valid emails for Talking Tech
Bug-19620-Allow-skipping-of-patrons-with-valid-ema.patch (text/plain), 2.17 KB, created by
Kyle M Hall (khall)
on 2018-03-02 16:19:42 UTC
(
hide
)
Description:
Bug 19620: Allow skipping of patrons with valid emails for Talking Tech
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-03-02 16:19:42 UTC
Size:
2.17 KB
patch
obsolete
>From 3730f93934e9a18f0621a126789dee8c3862ef3d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatetsolutions.com> >Date: Fri, 2 Mar 2018 11:10:12 -0500 >Subject: [PATCH] Bug 19620: Allow skipping of patrons with valid emails for > Talking Tech > >Some libraries want to be able to skip patrons with valid email addresses when generated outbound files for Talking Tech. > >Test Plan: >1) Apply this patch >2) Run TalkingTech_itiva_outbound.pl > Overdue will be easiest to use for testing >3) Note one or more patrons show up that have email addresses >4) Run again with -s ( or --skip-patrons-with-email ) >5) Note the new file no longer has patrons with emails! >--- > misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl b/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl >index 5826526..7ab5de2 100755 >--- a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl >+++ b/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl >@@ -37,6 +37,7 @@ use C4::Letters; > use C4::Overdues; > use Koha::Calendar; > use Koha::DateUtils; >+use Koha::Patrons; > > sub usage { > pod2usage( -verbose => 2 ); >@@ -57,6 +58,7 @@ my @holds_waiting_days_to_call; > my $library_code; > my $help; > my $outfile; >+my $skip_patrons_with_email; > > # maps to convert I-tiva terms to Koha terms > my $type_module_map = { >@@ -78,6 +80,7 @@ GetOptions( > 'type:s' => \@types, > 'w|waiting-hold-day:s' => \@holds_waiting_days_to_call, > 'c|code|library-code:s' => \$library_code, >+ 's|skip-patrons-with-email' => \$skip_patrons_with_email, > 'help|h' => \$help, > ); > >@@ -116,7 +119,11 @@ foreach my $type (@types) { > next; > } > >+ my $patrons; > foreach my $issues (@loop) { >+ $patrons->{$issues->{borrowernumber}} ||= Koha::Patrons->find( $issues->{borrowernumber} ) if $skip_patrons_with_email; >+ next if $skip_patrons_with_email && $patrons->{$issues->{borrowernumber}}->notice_email_address; >+ > my $date_dt = dt_from_string ( $issues->{'date_due'} ); > my $due_date = output_pref( { dt => $date_dt, dateonly => 1, dateformat =>'metric' } ); > >-- >2.10.2
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 19620
:
72376
|
72377
|
79113
|
79258