]> git.koha-community.org Git - koha.git/commit
Bug 26831: Use new PurgeListShareInvitesOlderThan syspref
authorAlex Buckley <alexbuckley@catalyst.net.nz>
Tue, 13 Sep 2022 00:09:14 +0000 (12:09 +1200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 31 Jan 2024 12:26:36 +0000 (13:26 +0100)
commitefeb650d7f23a064052f8f2c6fc7ca314ec84897
tree14e3bcb9354cbd8a0d3c74d9f1afe2e843186aa9
parent3dbe015201cf2bef70d9aa16aab91a60699a4098
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
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 428f6d5b17007da312250a5502c748c1f237fb2d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/cronjobs/cleanup_database.pl