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

--- Comment #6 from Kyle M Hall (khall) <[email protected]> ---
Created attachment 206851
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206851&action=edit
Bug 32459: (follow-up) --expire should still expire patrons after Bug 43544
follow-up

The Bug 43544 follow-up made update_category_to only write the new expiration
date when it is later than the one the patron already has, so that
--update-expiry never shortens a membership. --expire goes through the same
code, and yesterday is never later than a patron's current expiration date, so
--expire stopped doing anything.

This patch applies the "never shorten" check to --update-expiry only. --expire
always sets the expiration date to yesterday, as before. The verbose output for
--expire no longer says the date only applies to patrons expiring before then.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Patrons.t
3) Note all tests pass!
4) Create a patron category YOUTH, category type child, with an upper age
   limit of 17
5) Create a patron category ADULT, category type adult
6) Create a patron in YOUTH with a date of birth making them 18 or older, and
   an expiration date next year
7) Run misc/cronjobs/update_patrons_category.pl -f YOUTH -t ADULT --too_old
--expire -v --confirm
8) Note the patron is now in ADULT and expired yesterday!

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