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.
Could it also track changes that are made to the sql, if it is edited?
That's the idea - that's how the action logs work.
Created attachment 38217 [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
Created attachment 38222 [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>
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?
Created attachment 38382 [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> Amended for QA remarks (see comment #5) / MV
Comment on attachment 38382 [details] [review] Bug 14024 - add reports to action logs Sorry, mistaked for this
Comment on attachment 38222 [details] [review] Bug 14024 - add reports to action logs Reactivating previous patch.
Created attachment 38383 [details] [review] [Folluw-up] Bug 14024 - add reports to action logs See QA comment #5 - new reports log their Id instead of 0 - format info: <name> | <sql>
I think the follow-up needsa new sign-off.
Created attachment 38420 [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>
Created attachment 38421 [details] [review] [Folluw-up] 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>
Strange - i signed off on the follow up but it's not attaching right. Will figure this out in a second.
Okay, I think I fixed it. Nicole
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>
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>
It would be good to track the executed reports, don't you think?
Enhancement pushed to master. Thanks Marc!