Bug 21549 - Lock expired patron accounts
Summary: Lock expired patron accounts
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-11 12:27 UTC by Marcel de Rooy
Modified: 2020-11-23 07:04 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21549: Lock expired patron accounts (3.69 KB, patch)
2020-08-10 13:45 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 21549: Database revision for new preference (3.64 KB, patch)
2020-08-10 13:46 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 21549: Lock expired patron accounts (3.69 KB, patch)
2020-10-12 08:04 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 21549: Database revision for new preference (3.64 KB, patch)
2020-10-12 08:04 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 21549: Lock expired patron accounts (3.70 KB, patch)
2020-11-21 22:29 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 21549: Database revision for new preference (3.69 KB, patch)
2020-11-21 22:29 UTC, Michal Denar
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2018-10-11 12:27:03 UTC
See also bug 21336.
We could do the same for expired patron accounts. We would need an additional pref to define the number of days to wait before locking the account. After that they run in the same workflow as the unsubscribe requests in 21336 (lock, anonymize, delete).

Would it be useful?
Comment 1 Marcel de Rooy 2018-10-15 07:37:49 UTC
Essentially, we need something like:

Koha::Patrons->search_expired({ days => $days })->search({ login_attempts => { '!=' => -1 } })->lock({ remove => 1, verbose => $verbose });
Comment 2 Marcel de Rooy 2020-08-10 13:45:56 UTC
Created attachment 108000 [details] [review]
Bug 21549: Lock expired patron accounts

Adding a search on locked patrons to the search_expired in cron script.
This prevents relocking.

Test plan:
Prove Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2020-08-10 13:46:01 UTC
Created attachment 108001 [details] [review]
Bug 21549: Database revision for new preference

Introducing LockExpiredDelay.

Test plan:
Run upgrade. Check syspref.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2020-10-12 08:04:07 UTC
Created attachment 111480 [details] [review]
Bug 21549: Lock expired patron accounts

Adding a search on locked patrons to the search_expired in cron script.
This prevents relocking.

Test plan:
Prove Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2020-10-12 08:04:12 UTC
Created attachment 111481 [details] [review]
Bug 21549: Database revision for new preference

Introducing LockExpiredDelay.

Test plan:
Run upgrade. Check syspref.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2020-10-12 08:06:28 UTC
Rebased. Please test !
Comment 7 Michal Denar 2020-11-21 22:20:07 UTC
Hi,
plaease rebase on master.

Thank you.
Comment 8 Michal Denar 2020-11-21 22:27:14 UTC
Sorry, Patch wors for me now. My fault. Back to NSO.
Comment 9 Michal Denar 2020-11-21 22:29:09 UTC
Created attachment 113914 [details] [review]
Bug 21549: Lock expired patron accounts

Adding a search on locked patrons to the search_expired in cron script.
This prevents relocking.

Test plan:
Prove Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 10 Michal Denar 2020-11-21 22:29:12 UTC
Created attachment 113915 [details] [review]
Bug 21549: Database revision for new preference

Introducing LockExpiredDelay.

Test plan:
Run upgrade. Check syspref.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 11 Marcel de Rooy 2020-11-23 07:04:25 UTC
(In reply to Michal Denar from comment #10)
> Created attachment 113915 [details] [review] [review]
> Bug 21549: Database revision for new preference
> 
> Introducing LockExpiredDelay.
> 
> Test plan:
> Run upgrade. Check syspref.
> 
> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
> 
> Signed-off-by: Michal Denar <black23@gmail.com>

Thanks Michal