Bug 39193

Summary: Add option -DAYS to delete_patrons.pl
Product: Koha Reporter: Koha collecto <koha>
Component: Command-line UtilitiesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: robin
Version: 24.05   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Koha collecto 2025-02-24 19:53:50 UTC
Hi !

For example, Batch_anonymise.pl has this option :
--days DAYS   anonymise patron history that is older than DAYS days.

It would be super helpful if deleted_patrons.pl had a similar option for deleting patrons that are expired since -DAYS number of days.

We would like to automate the patron's purge, but right now the only option is to choose a specific date, wish means that we can't run the cronjob automaticaly without having to choose a new date. 

Having the -DAYS option, we could run automaticaly the cronjob, for example, every month with -365 so every month patrons that are expired since at least 1 year are deleted.