Summary: | add all restrictions purge to cleanup_database.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Command-line Utilities | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12760 | ||
Bug Blocks: | |||
Attachments: |
Bug 13166 - add all restrictions purge to cleanup_database.pl
Bug 13166 - add all restrictions purge to cleanup_database.pl [SIGNED OFF] Bug 13166 - add all restrictions purge to cleanup_database.pl [PASSED QA] Bug 13166 - add all restrictions purge to cleanup_database.pl |
Description
Fridolin Somers
2014-10-30 10:49:05 UTC
Created attachment 32968 [details] [review] Bug 13166 - add all restrictions purge to cleanup_database.pl Bug 12760 adds the ability to purge expired restrictions older than some days. But if you want to purge all expired restrictions, using "--restrictions 0" does not work, it's like "--restrictions" so it uses default purge days. This patch adds a new option "--all-restrictions" to purge all expired restrictions. Test plan : - Select a borrower - Create a restriction with expiration date in the futur - Create a restriction expired since 1 day - Create a restriction expired since 10 days - run without argument "misc/cronjobs/cleanup_database.pl" => You see help text for --all-restrictions option - run "misc/cronjobs/cleanup_database.pl -v --restrictions --all-restrictions" => You get the message : You can not specify both --restrictions and --all-restrictions - run "misc/cronjobs/cleanup_database.pl -v --restrictions 30" => no restriction is removed - run "misc/cronjobs/cleanup_database.pl -v --restrictions 9" => restriction expired since 10 days is removed - run "misc/cronjobs/cleanup_database.pl -v --all-restrictions" => restriction expired since 1 day is removed Created attachment 32971 [details] [review] Bug 13166 - add all restrictions purge to cleanup_database.pl Bug 12760 adds the ability to purge expired restrictions older than some days. But if you want to purge all expired restrictions, using "--restrictions 0" does not work, it's like "--restrictions" so it uses default purge days. This patch adds a new option "--all-restrictions" to purge all expired restrictions. Test plan : - Select a borrower - Create a restriction with expiration date in the futur - Create a restriction expired since 1 day - Create a restriction expired since 10 days - run without argument "misc/cronjobs/cleanup_database.pl" => You see help text for --all-restrictions option - run "misc/cronjobs/cleanup_database.pl -v --restrictions --all-restrictions" => You get the message : You can not specify both --restrictions and --all-restrictions - run "misc/cronjobs/cleanup_database.pl -v --restrictions 30" => no restriction is removed - run "misc/cronjobs/cleanup_database.pl -v --restrictions 9" => restriction expired since 10 days is removed - run "misc/cronjobs/cleanup_database.pl -v --all-restrictions" => restriction expired since 1 day is removed Created attachment 36673 [details] [review] [SIGNED OFF] Bug 13166 - add all restrictions purge to cleanup_database.pl Bug 12760 adds the ability to purge expired restrictions older than some days. But if you want to purge all expired restrictions, using "--restrictions 0" does not work, it's like "--restrictions" so it uses default purge days. This patch adds a new option "--all-restrictions" to purge all expired restrictions. Test plan : - Select a borrower - Create a restriction with expiration date in the futur - Create a restriction expired since 1 day - Create a restriction expired since 10 days - run without argument "misc/cronjobs/cleanup_database.pl" => You see help text for --all-restrictions option - run "misc/cronjobs/cleanup_database.pl -v --restrictions --all-restrictions" => You get the message : You can not specify both --restrictions and --all-restrictions - run "misc/cronjobs/cleanup_database.pl -v --restrictions 30" => no restriction is removed - run "misc/cronjobs/cleanup_database.pl -v --restrictions 9" => restriction expired since 10 days is removed - run "misc/cronjobs/cleanup_database.pl -v --all-restrictions" => restriction expired since 1 day is removed Signed-off-by: Larry Baerveldt <larry@bywatersolutions.com> Created attachment 37312 [details] [review] [PASSED QA] Bug 13166 - add all restrictions purge to cleanup_database.pl Bug 12760 adds the ability to purge expired restrictions older than some days. But if you want to purge all expired restrictions, using "--restrictions 0" does not work, it's like "--restrictions" so it uses default purge days. This patch adds a new option "--all-restrictions" to purge all expired restrictions. Test plan : - Select a borrower - Create a restriction with expiration date in the futur - Create a restriction expired since 1 day - Create a restriction expired since 10 days - run without argument "misc/cronjobs/cleanup_database.pl" => You see help text for --all-restrictions option - run "misc/cronjobs/cleanup_database.pl -v --restrictions --all-restrictions" => You get the message : You can not specify both --restrictions and --all-restrictions - run "misc/cronjobs/cleanup_database.pl -v --restrictions 30" => no restriction is removed - run "misc/cronjobs/cleanup_database.pl -v --restrictions 9" => restriction expired since 10 days is removed - run "misc/cronjobs/cleanup_database.pl -v --all-restrictions" => restriction expired since 1 day is removed Signed-off-by: Larry Baerveldt <larry@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Patch pushed to master. Thanks Frido! |