Bug 25624: Add --where option to update_patrons_category.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 1 Sep 2020 13:07:49 +0000 (15:07 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 28 Sep 2020 14:09:10 +0000 (16:09 +0200)
commitaa8ee99fb77f3de1904efe52d0bbd847cc4e63aa
treed4cdfe230977cc0dcf87f89fc45cc54705c8f4d8
parent5d5a49a7ef165b7b47dda6357aaf2953dacfa362
Bug 25624: Add --where option to update_patrons_category.pl

The script did not allow to find empty fields or use wildcards

With this new option we will now have the ability to filter patrons by
some of their attributes.

Test plan:
1 - Run the script with no parameters and verify the help explains the parameters
2 - Try the script with one or more --where parameters, like:
  --where "firstname='koha'"
3 - Test null values
  --where "firstname IS NULL"
4 - Test like values with wildcards
  --where "firstname LIKE '%a%'
5 - Test like with the word null to find fields containing the word rather than being unset

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
misc/cronjobs/update_patrons_category.pl