[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
Wed Oct 28 11:35:22 CET 2020


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

--- Comment #1 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 112634
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112634&action=edit
Bug 26831: Add a system preference to define the number of days used for
purging unaccepted list share invites in cleanup_database.pl

The PurgeUnacceptedListShareInvitesOlderThan system preference value
is used whenever the cleanup_database.pl cron job is called without the
--list-invites parameter.

If neither the system preference or the --list-invites parameter has a
value then the cronjob errors out.

Test plan:
1. Apply patch
2. Update database:
sudo koha-shell <instancename>
cd installer/data/mysql
./updatedatabase.pl

3. Confirm the default value of the
PurgeUnacceptedListShareInvitesOlderThan system preference is 14

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

5. Confirm the following text is included in the output:
"Purging unaccepted list share invites older than 14 days."

6. Clear the aforementioned system preference. Run the cleanup_database.pl cron
job with
the --list-invites parameter defined:
./cleanup_database.pl --list-invites 10 -v

7. Confirm the following text is included in the output:
"Purging unaccepted list share invites older than 10 days."

8. Input a value of 20 into the aforementioned system preference. Run the cron
job with --list-invites defined:
./cleanup_database.pl --list-invites 10 -v

9. Confirm the following text is included in the output:
"Purging unaccepted list share invites older than 10 days."

10. Clear the aforementioned system preference value and run the cron job
without the
--list-invites parameter:
./cleanup_database.pl -v

11. Confirm the following text is included in the output:
"You did not specify any cleanup work for the script to do"

Sponsored-by: Catalyst IT

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


More information about the Koha-bugs mailing list