From 78d1093cb597d22cb53e96b971ceed0b3d08a303 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 20 Nov 2023 14:21:58 +0000 Subject: [PATCH] Bug 34854: (follow-up) Param name change + POD This patch updates the parameter name to more clearly define what it's used for and also adds missing documentation. Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../thirdparty/TalkingTech_itiva_outbound.pl | 41 ++++++++++++------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl b/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl index b7deefdfc3..dfc6812be6 100755 --- a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl +++ b/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl @@ -53,7 +53,7 @@ my $help; my $outfile; my $skip_patrons_with_email; my $patron_branchcode; -my $if_patron_field_equals; +my $skip_patrons_with_field_match; # maps to convert I-tiva terms to Koha terms my $type_module_map = { @@ -69,16 +69,16 @@ my $type_notice_map = { }; GetOptions( - 'o|output:s' => \$outfile, - 'v' => \$verbose, - 'lang:s' => \$language, - '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, - 'i|if-patron-field-equals:s' => \$if_patron_field_equals, - 'pb|patron-branchcode:s' => \$patron_branchcode, - 'h|help' => \$help, + 'o|output:s' => \$outfile, + 'v' => \$verbose, + 'lang:s' => \$language, + '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, + 'sf|skip-patrons-with-field:s' => \$skip_patrons_with_field_match, + 'pb|patron-branchcode:s' => \$patron_branchcode, + 'h|help' => \$help, ); $language = uc($language); @@ -104,8 +104,8 @@ if ( defined $outfile ) { my $format = 'V'; # format for phone notifications my ( $if_patron_field_equals_field, $if_patron_field_equals_value ); -( $if_patron_field_equals_field, $if_patron_field_equals_value ) = split( /:/, $if_patron_field_equals ) - if $if_patron_field_equals; +( $if_patron_field_equals_field, $if_patron_field_equals_value ) = split( /:/, $skip_patrons_with_field_match ) + if $skip_patrons_with_field_match; foreach my $type (@types) { $type = uc($type); #just in case lower or mixed-case was supplied @@ -130,7 +130,7 @@ foreach my $type (@types) { $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; next - if $if_patron_field_equals + if $skip_patrons_with_field_match && $patrons->{ $issues->{borrowernumber} }->$if_patron_field_equals_field eq $if_patron_field_equals_value; my $date_dt = dt_from_string ( $issues->{'date_due'} ); @@ -226,6 +226,19 @@ consortium purposes and apply library specific settings, such as prompts, to those notices. This field can be blank if all messages are from a single library. +=item B<--skip-patrons-with-email> B<-s> + +OPTIONAL + +Flag used to skip all patrons with a valid notice email address defined + +=item B<--skip-patrons-with-field> B<-sf> + +OPTIONAL + +A colon delimited string with a field from the borrowers table and a value to match, +used to skip notice processing. Example `sort1:SKIP` + =item B<--patron-branchcode> B<--pb> OPTIONAL -- 2.39.5