https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32459

--- Comment #7 from Kyle M Hall (khall) <[email protected]> ---
Created attachment 206905
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206905&action=edit
Bug 32459: Add ability to expire patrons when their category is changed

A common use of update_patrons_category.pl is to move a child card to an adult
account. When that happens some libraries need a new application form signed,
because the patron is now responsible for the account themselves, so the card
should stop working until they come in and sign it.

Right now the cron only changes the category. There is no way to have it expire
the accounts it touched, and expiring them afterwards by hand or with a report
catches patrons the category change never touched.

This patch adds an --expire switch. When it is passed, each updated patron gets
an expiration date of yesterday, so they are expired as soon as their category
changes. It can't be combined with --update-expiry, which sets the expiration
date from the new category instead.

Test Plan:
1) Apply this patch
2) Create a patron category YOUTH, category type child, with an upper age
   limit of 17 and an enrollment period of 12 months
3) Create a patron category ADULT, category type adult, with an enrollment
   period of 36 months
4) Create a patron in YOUTH with a date of birth making them 18 or older, and
   an expiration date in the future
5) Run misc/cronjobs/update_patrons_category.pl -f YOUTH -t ADULT --too_old
--expire -v
6) Note the output says the expiration date will be set to yesterday, and that
   nothing was changed because this is test mode
7) Run the same command again, adding --confirm
8) Note the patron is now in ADULT and shows as expired!
9) Run misc/cronjobs/update_patrons_category.pl -f YOUTH -t ADULT
--update-expiry --expire --confirm
10) Note the script tells you the two switches can't be used together!

Sponsored-by: ByWater Solutions

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to