Bug 14024 - Add reports to action logs
Summary: Add reports to action logs
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 27432 26669
  Show dependency treegraph
 
Reported: 2015-04-20 14:20 UTC by Nicole C. Engard
Modified: 2021-01-14 14:47 UTC (History)
5 users (show)

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


Attachments
Bug 14024 - add reports to action logs (6.74 KB, patch)
2015-04-20 20:21 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 14024 - add reports to action logs (6.80 KB, patch)
2015-04-20 21:54 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 14024 - add reports to action logs (6.82 KB, patch)
2015-04-23 06:36 UTC, Marc Véron
Details | Diff | Splinter Review
[Folluw-up] Bug 14024 - add reports to action logs (2.27 KB, patch)
2015-04-23 06:51 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 14024 - add reports to action logs (6.86 KB, patch)
2015-04-23 13:27 UTC, Nicole C. Engard
Details | Diff | Splinter Review
[Folluw-up] Bug 14024 - add reports to action logs (2.32 KB, patch)
2015-04-23 13:28 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 14024 - add reports to action logs (6.93 KB, patch)
2015-06-04 10:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14024 - add reports to action logs (2.38 KB, patch)
2015-06-04 10:29 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2015-04-20 14:20:16 UTC
Lately I've seen a lot of people deleting reports they shouldn't. I'd love it if there were a log for reports. So when you create it the action log keeps a record of what the SQL was and if you delete it it tracks who did the deleting. That way I can recover old SQL from the logs if need be.
Comment 1 Tom Misilo 2015-04-20 17:47:56 UTC
Could it also track changes that are made to the sql, if it is edited?
Comment 2 Nicole C. Engard 2015-04-20 18:40:50 UTC
That's the idea - that's how the action logs work.
Comment 3 Marc Véron 2015-04-20 20:21:15 UTC Comment hidden (obsolete)
Comment 4 Nicole C. Engard 2015-04-20 21:54:10 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2015-04-22 21:59:23 UTC
Hi Marc,

I like this addition :) 2 things:

1) When adding a report you always log the id with 0. Please take a look at options to log the real report id. It seems to work ok for ADD and other logs like adding patrons or items.

2) Can you standardize the info a bit? They are all a little different. I had started working on a follow-up but will better leave it to you. Maybe we could even do simpler - just <name> | <sql> somehow matching the syspref syntax?
Comment 6 Marc Véron 2015-04-23 06:36:03 UTC Comment hidden (obsolete)
Comment 7 Marc Véron 2015-04-23 06:37:32 UTC
Comment on attachment 38382 [details] [review]
Bug 14024 - add reports to action logs

Sorry, mistaked for this
Comment 8 Marc Véron 2015-04-23 06:38:03 UTC
Comment on attachment 38222 [details] [review]
Bug 14024 - add reports to action logs

Reactivating previous patch.
Comment 9 Marc Véron 2015-04-23 06:51:19 UTC Comment hidden (obsolete)
Comment 10 Marc Véron 2015-04-23 06:53:28 UTC
I think the follow-up needsa new sign-off.
Comment 11 Nicole C. Engard 2015-04-23 13:27:50 UTC Comment hidden (obsolete)
Comment 12 Nicole C. Engard 2015-04-23 13:28:50 UTC Comment hidden (obsolete)
Comment 13 Nicole C. Engard 2015-04-23 13:30:08 UTC
Strange - i signed off on the follow up but it's not attaching right. Will figure this out in a second.
Comment 14 Nicole C. Engard 2015-04-23 13:32:20 UTC
Okay, I think I fixed it.

Nicole
Comment 15 Jonathan Druart 2015-06-04 10:29:17 UTC
Created attachment 39841 [details] [review]
Bug 14024 - add reports to action logs

This patch sets adds the possibility to log new, update and delete actions for saved reports.

To test:
-Apply patch
-Run updatedatabase.pl
-Enable system preference ReportsLog
-Create, duplicate, edit and delete saved reports
-Go to Home > Tools > Logs
-Verify that you can select "Reports" in Modules list
-Verify that your actions were logged

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 16 Jonathan Druart 2015-06-04 10:29:28 UTC
Created attachment 39842 [details] [review]
Bug 14024 - add reports to action logs

See QA comment #5

- new reports log their Id instead of 0
- format info: <name> | <sql>

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 17 Jonathan Druart 2015-06-04 10:31:34 UTC
It would be good to track the executed reports, don't you think?
Comment 18 Tomás Cohen Arazi 2015-06-04 14:01:02 UTC
Enhancement pushed to master.

Thanks Marc!