[Bug 21809] New: Deleting a request does not delete its log entries
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 Bug ID: 21809 Summary: Deleting a request does not delete its log entries Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: andrew.isherwood@ptfs-europe.com Bug 20750 adds the ability for events on ILL requests to be logged in the action logs. Currently changes to request status can be logged. However, when a request is deleted, the logs associated with that request are not. Since the request ID then becomes available, the next time a request is created, it will re-use the ID of the deleted request and instantly be associated with the log entries for that request. It's not currently possible to fix this since C4::Log doesn't provide any methods to delete log entries. So I'm going to add an enhancement bug for that. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21810 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21810 [Bug 21810] Add methods to allow deleting of action logs -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Would one option be to not reuse the ID? Or have a real PK that is used instead of the ID used? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 --- Comment #2 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- illrequests.illrequest_id is an auto_increment column, which is inline with the vast majority of primary key columns in Koha. Googling around suggests that MySQL/MariaDB shouldn't reuse deleted values in auto_increment columns, which was always my understanding also. However, I'm seeing log entries associated with requests where the log entries are dated before the request was created. My assumption was that IDs were being re-used, though, I have failed to replicate that behaviour. So perhaps the problem is not caused by that after all. I believe though that the bug is still valid. If a request is deleted, its log entries should be also. Due to the inability to create a foreign key on action_logs.object (due it potentially referring to many different keys), and therefore the inability to create a cascade, I believe we should do this cleanup manually. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32630 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I believe this might be a WONTFIX since we never clean up action_logs if something is deleted (the action_logs usually also contain the information, that something WAS deleted in the first place). Then you can use cleanup_database.pl to clean action_logs: https://git.koha-community.org/Koha-community/Koha/src/branch/master/misc/cr... --log-modules Specify which action log modules to trim. Repeatable. --preserve-log Specify which action logs to exclude. Repeatable. --logs DAYS purge entries from action_logs older than DAYS days. Defaults to 180 days if no days specified. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21809 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org