Bug 32480 - Specify action of action_logs entries to purge
Summary: Specify action of action_logs entries to purge
Status: RESOLVED DUPLICATE of bug 32686
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Alex Buckley
QA Contact: Testopia
Depends on:
Reported: 2022-12-16 02:35 UTC by Alex Buckley
Modified: 2023-01-20 02:00 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:

Bug 32480: Specify action of action_logs to purge (2.05 KB, patch)
2023-01-19 02:45 UTC, Alex Buckley
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buckley 2022-12-16 02:35:46 UTC
It would be helpful if libraries had the following action_logs purging behaviour:

- Be able to specify the module and action of action_logs entries they would like to purge.

Use case: Libraries with a patron import overwriting patron records several times a day will likely want to truncate member 'create' entries from the action_logs tables, whilst retaining other patron action_logs entries.

- Be able to specify a different number of days for purging different modules.

Use case: The library with the patron import may want to purge member 'create' action logs older than 30 days, but purge all other logs older than 365 days.

We think this could be accomplished by adding a separate script for purging action_logs:
./purge_logs.pl --module MEMBERS --action CREATE --days 30
./purge_logs.pl --module all --action all --days 365
Comment 1 Alex Buckley 2023-01-19 02:45:44 UTC
Created attachment 145408 [details] [review]
Bug 32480: Specify action of action_logs to purge

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 2 Alex Buckley 2023-01-20 02:00:41 UTC

*** This bug has been marked as a duplicate of bug 32686 ***