[Koha-bugs] [Bug 22052] DeleteExpiredOpacRegistrations should skip bad borrowers
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Dec 28 20:19:13 CET 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22052
--- Comment #2 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 83546
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83546&action=edit
Bug 22052: Refactor DeleteExpiredOpacReigstrations
This patch changes the sub to use Koha::Objects and updates the tests.
Previously the sub would die on borrowers with checkouts and would
delete borrowers if they had fines
To test:
1 - prove -v t/db_dependent/
2 - Set your selfreg preferences:
PatronSelfRegistration: Allow
PatronSelfRegistrationDefaultCategory: SELFREG (or of your choice)
PatronSelfRegistrationExpireTemporaryAccountsDelay: 30
3 - Register a patron into SELFREG or how you set above
4 - Set their date enrolled to two months ago
5 - Checkout an item to the patron
6 - Issue a fine to that patron
7 - perl misc/cronjobs/cleanup_database.pl --del-exp-selfreg -v
8 - The job should die with an error
9 - Check in the item
10 - run the corn again - patron is deleted, oops
11 - Apply patch
12 - Create another patron in the same way
13 - Checkout and fine the patron
14 - run the cron
15 - they are not deleted, and no error
16 - checkin the item
17 - run the cron
18 - they are not deleted and no error
19 - clear the fine
20 - run the cron
21 - patron is deleted, huzzah
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list