Summary: | Database clean-up: purge messages | ||
---|---|---|---|
Product: | Koha | Reporter: | Didier Gautheron <didier.gautheron> |
Component: | Command-line Utilities | Assignee: | Didier Gautheron <didier.gautheron> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, bgkriegel, caroline.cyr-la-rose, fridolin.somers, jonathan.druart, m.de.rooy, robin, severine.queune, victor |
Version: | Main | Keywords: | Manual |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
Adds a new option to the cleanup_database.pl cron job to schedule deletion of messages added to patron accounts.
|
Version(s) released in: |
21.05.00,20.11.02
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 18081 | ||
Attachments: |
Bug 24541: Purge old messages
Attachment to Bug 24541 - Database cleanups, purge messages Bug 24541: Purge old messages Bug 24541: Purge old messages Bug 24541: Purge old messages Bug 24541: Purge old messages Bug 24541: Purge old messages |
Description
Didier Gautheron
2020-01-30 09:03:08 UTC
Created attachment 98152 [details] [review] Bug 24541: Purge old messages misc/cronjobs/cleanup_database.pl provides some database cleanup. This patch adds cleanup for messages table. Test plan : - Count messages : select count(*),date(message_date) from messages group by date(message_date); - Run cleanup : misc/cronjobs/cleanup_database.pl -v --messages 365 - Recount messages Please rebase Created attachment 101509 [details] [review] Attachment to Bug 24541 - Database cleanups, purge messages Bug 24541: Purge old messages misc/cronjobs/cleanup_database.pl provides some database cleanup. This patch adds cleanup for messages table. Test plan : - Count messages : select count(*),date(message_date) from messages group by date(message_date); - Run cleanup : misc/cronjobs/cleanup_database.pl -v --messages 365 - Recount messages Created attachment 101541 [details] [review] Bug 24541: Purge old messages misc/cronjobs/cleanup_database.pl provides some database cleanup. This patch adds cleanup for messages table. Test plan : - Count messages : select count(*),date(message_date) from messages group by date(message_date); - Run cleanup : misc/cronjobs/cleanup_database.pl -v --messages 365 - Recount messages Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works Ok, no errors. I have a patch that is enhancing greatly this script. By any chances could base yours on top of it? See bug 24153. (In reply to Jonathan Druart from comment #5) > I have a patch that is enhancing greatly this script. By any chances could > base yours on top of it? > > See bug 24153. Nevermind, I will do it later. Created attachment 107369 [details] [review] Bug 24541: Purge old messages misc/cronjobs/cleanup_database.pl provides some database cleanup. This patch adds cleanup for messages table. Test plan : - Count messages : select count(*),date(message_date) from messages group by date(message_date); - Run cleanup : misc/cronjobs/cleanup_database.pl -v --confirm --messages 365 - Recount messages rebase and follow --confirm flag Didier, please use Koha::Patron::Messages->filter_by_last_update See the occurrences of 'filter_by_last_update' in this script. Created attachment 107415 [details] [review] Bug 24541: Purge old messages misc/cronjobs/cleanup_database.pl provides some database cleanup. This patch adds cleanup for messages table. Test plan : - Count messages : select count(*),date(message_date) from messages group by date(message_date); - Run cleanup : misc/cronjobs/cleanup_database.pl -v --confirm --messages 365 - Recount messages use Koha::Patron::Messages->filter_by_last_update Created attachment 112933 [details] [review] Bug 24541: Purge old messages misc/cronjobs/cleanup_database.pl provides some database cleanup. This patch adds cleanup for messages table. Test plan : - Count messages : select count(*),date(message_date) from messages group by date(message_date); - Run cleanup : misc/cronjobs/cleanup_database.pl -v --confirm --messages 365 - Recount messages Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Works fine and respects the use of 'confirm' flag. Nice one :) Created attachment 114711 [details] [review] Bug 24541: Purge old messages misc/cronjobs/cleanup_database.pl provides some database cleanup. This patch adds cleanup for messages table. Test plan : - Count messages : select count(*),date(message_date) from messages group by date(message_date); - Run cleanup : misc/cronjobs/cleanup_database.pl -v --confirm --messages 365 - Recount messages Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Works as expected, QA script ok, code ok. Pushed to master for 21.05, thanks to everybody involved! Small enhancement, I choose to backport. Pushed to 20.11.x for 20.11.02 Enhancement, not backporting to 20.05. Please ask if needed |