Bug 26669: Last Run if report not always updated
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 14 Jan 2021 15:46:25 +0000 (16:46 +0100)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 8 Apr 2022 14:46:13 +0000 (10:46 -0400)
commit23cf6dd76768ee6e7008ce23322c4575720f8480
treedcea3097e531c7221694e746a2ebb34c368fcee9
parentaeb6034ea9ca525173192145be8c580f96ff4288
Bug 26669: Last Run if report not always updated

The last run of a report is updated only if method execute_query() is
called with report_id.
This whas missing for :
- when report is run publicly
- when report is sent by email
- when report is exported

Patch changes the method signature to use a hash of params, in order to
easily avoid some params.

Test plan :

1) Create a report.
2) Run report.
3) Check the report listing.  Confirm that the last run info on the report is updated.
4) Make report public.
5) Run report via public url.
6) Check the report listing.  Confirm that the last run info on the report IS NOT updated.
7) Schedule the report to run at a given time and e-mailed to an address.
8) After the report runs at the scheduled time, check the report listing.  Confirm that the last run info on the report IS NOT updated.
9) Run report.
10) Export results.
11) Check the report listing.  Confirm that the last run info on the report IS NOT updated AT THE TIME OF THE EXPORT.

Questionable (I don't know if this is addressed):
12) Run report on backend through a cron job and send results via e-mail.
13) Check the report listing.  Confirm that the last run info on the report IS NOT updated.

14) Apply patch.
15) Rerun steps 2-13.  Confirm that steps 3, 6, 8, 11, and 13 DO UPDATE the last run info.

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Reports/Guided.pm
misc/cronjobs/runreport.pl
opac/svc/report
reports/guided_reports.pl
svc/report
t/db_dependent/Reports/Guided.t