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 <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
efd932ad42
commit
78d1093cb5
1 changed files with 27 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue