Bug 38527 - Add logging of reports (created, run, changed and deleted)
Summary: Add logging of reports (created, run, changed and deleted)
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-25 13:19 UTC by Inkeri Hakulinen
Modified: 2024-11-26 07:54 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Inkeri Hakulinen 2024-11-25 13:19:20 UTC
For GDPR reasons it would be good to have Koha to log the use of reports. I suggest that the log should include data about
-who created which report and when and what the sql was
-who run which report and when and what the sql was (the actual sql that was run, since sometimes you choose / fill in some parameters when you run the report)
-who changed which report and when and how the sql was changed (before & after)
-who deleted which report and when and what the sql was

-probably also the updates to the report descriptions would be good to log?

However, the results of the reports should not be saved into logs, of course.

This addition would bring transparency about the use of the reports. That would be important for preventing misuse of customer data. Now Koha doesn't collect so detailed data, and it would be easy to collect customer data without a trace in the logs. This data would of course be helpful also in cases, when someone accidentally changes a report so that it doesn't work anymore. You could detect the old report from the logs. Also this would help solving crashes that happened due to running too heavy reports.
Comment 1 Katrin Fischer 2024-11-25 14:01:01 UTC
hi Inkeri, the ReportsLog shoudl already cover these, did you test?
Comment 2 Katrin Fischer 2024-11-25 14:02:35 UTC
Bug 14024 and bug 27432
Comment 3 Inkeri Hakulinen 2024-11-26 07:08:12 UTC
Ok, thanks. I hadn't found that option.

Seems that there are two log viewers in Koha? One version accessed from the patron view doesn't even mention reports. Maybe this section is more for viewing the actions made to that borrower record. Then Through Tools -> Log viewer I can access a bit more detailed log viewer, that has also option "Reports" in it. However, it doesn't seem to show when reports are run. For me it shows "add", "delete" and "modify". But nothing that is "run". Might it be some setting in server that affects this? Should this log viewer also show running the reports?
Comment 4 Katrin Fischer 2024-11-26 07:54:09 UTC
(In reply to Inkeri Hakulinen from comment #3)
> Ok, thanks. I hadn't found that option.
> 
> Seems that there are two log viewers in Koha? One version accessed from the
> patron view doesn't even mention reports. Maybe this section is more for
> viewing the actions made to that borrower record. Then Through Tools -> Log
> viewer I can access a bit more detailed log viewer, that has also option
> "Reports" in it. However, it doesn't seem to show when reports are run. For
> me it shows "add", "delete" and "modify". But nothing that is "run". Might
> it be some setting in server that affects this? Should this log viewer also
> show running the reports?

Hi Inkeri, that's it exactly: when you access the logs from the patron record or an item record it's limited in the choices you can make to that user or bibliographic record. You are also right about "RUN", there are some patches that need more work on bug 27432. Maybe you can leave a comment there to get them moving again.