[Koha-bugs] [Bug 26831] Replace 'list-invites' parameter with system preference in cleanup_database.pl cronjob

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 19 02:53:17 CEST 2022


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

--- Comment #9 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 140751
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140751&action=edit
Bug 26831: Use new PurgeListShareInvitesOlderThan syspref

Enable librarians in the staff client to control when unaccepted list
invites will be removed from the database.

Test plan:
1. Apply patches

2. Update database
sudo koha-shell <instance>
cd installer/data/mysql
./updatedatabase.pl

3. Confirm the PurgeListShareInvitesOlderThan syspref = 14

4. Run cleanup_database.pl with --list-invites parameter defined:
sudo koha-shell <instance>
cd misc/cronjobs
./cleanup_database.pl --list-invites 10 -v

5. Confirm the output contains:
"Purging unaccepted list share invites older than 10 days."

6. Set PurgeListShareInvitesOlderThan syspref = 15

7. Run cleanup_database.pl without the --list-invites parameter:
sudo koha-shell <instance>
cd misc/cronjobs
./cleanup_database.pl -v

8. Confirm the output contains:
"Purging unaccepted list share invites older than 15 days."

9. Empty PurgeListShareInvitesOlderThan syspref

10. Run cleanup_database without the --list-invites parameter:
sudo koha-shell <instance.
cd misc/cronjobs
./cleanup_database.pl

11. Observe you get the following output (along with documentation on all
parameters of the script):
"You did not specify any cleanup work for the script to do."

12. Run the cleanup_database with no days defined for the --list-invites
parameter:
sudo koha-shell <instance>
cd misc/cronjobs
./cleanup_database.pl --list-invites -v

13. Confirm the output contains:
"Purging unaccepted list share invites older than 14 days."

Sponsored-by: Catalyst IT, New Zealand

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list