From 686060d4f7ca31e4401be5a9a420106dd8913c34 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 16 Jul 2020 17:49:12 +0000 Subject: [PATCH] Bug 25624: Update documentation --- misc/cronjobs/update_patrons_category.pl | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/misc/cronjobs/update_patrons_category.pl b/misc/cronjobs/update_patrons_category.pl index f38fd92a93..e094044086 100644 --- a/misc/cronjobs/update_patrons_category.pl +++ b/misc/cronjobs/update_patrons_category.pl @@ -55,10 +55,10 @@ Options: -fu=X --fineunder=X update if fines under X amount -rb=date --regbefore update if registration date is before given date -ra=date --regafter update if registration date is after a given date - -d --dbfield name=value where is a column in the borrowers table, patrons will be updated if the field is equal to given - -dn --notfield name=value where is a column in the borrowers table, patrons will be updated if the field is equal to given - -dl --likefield name=value where is a column in the borrowers table, patrons will be updated if the field is equal to given - -dnl --notlikefield name=value where is a column in the borrowers table, patrons will be updated if the field is equal to given + -d --field name=value where is a column in the borrowers table, patrons will be updated if the field is equal to given + -dn --notfield name=value where is a column in the borrowers table, patrons will be updated if the field is not equal to given + -dl --likefield name=value where is a column in the borrowers table, patrons will be updated if the field is like the given + -dnl --notlikefield name=value where is a column in the borrowers table, patrons will be updated if the field is not like the given -v -verbose verbose mode -c --confirm commit changes to db, no action will be taken unless this switch is included -b --branch only deal with patrons from this library/branch @@ -125,6 +125,7 @@ Enter a date in ISO format YYYY-MM-DD and only patrons registered after this dat =item B<--field column=value | -d column=value> Use this flag to specify a column in the borrowers table and update only patrons whose value in that column equals the value supplied (repeatable) +A value of null will check for a field that is not set. e.g. --field dateexpiry=2016-01-01 @@ -133,11 +134,32 @@ will update all patrons who expired on that date, useful for schools etc. =item B<--notfield column=value | -dn column=value> Use this flag to specify a column in the borrowers table and update only patrons whose value in that column does not equal the value supplied (repeatable) +A value of null will check for a field that is not set. e.g. --notfield email=NULL will update all patrons with no value for email +=item B<--likefield column=value | -dl column=value> + +Use this flag to specify a column in the borrowers table and update only patrons whose value in that column is like the value supplied (repeatable) +use '%' as a wildcard. +A value of null will check for a field that is not set. + +e.g. +--likefield categorycode=%CHILD +will update all patrons with a category ending in CHILD. + +=item B<--notlikefield column=value | -dnl column=value> + +Use this flag to specify a column in the borrowers table and update only patrons whose value in that column is not like the value supplied (repeatable) +use '%' as a wildcard. +A value of null will check for a field that is not set. + +e.g. +--notlikefield categorycode=RESIDENT% +will update all patrons whose category does not begin with RESIDENT. + =back =head1 DESCRIPTION -- 2.11.0