https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41918 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198258 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198258&action=edit Bug 41918: (QA follow-up) Refactor Koha::Reports->running - Fix POD synopsis: invalid syntax and wrong field (userid vs borrowernumber) replaced with a correct example and parameter list. - Build the WHERE clause with parameterised bindings via $schema->storage->dbh, removing string interpolation of $user_id / $report_id into LIKE patterns and the regex match. IDs are formatted with %d so non-integer input becomes 0 and cannot inject regex/LIKE metacharacters. - Return a Koha::Reports resultset instead of a list of MySQL process ids. The method name now matches what it returns and callers can use the standard ->count / iteration interface. The single in-tree caller in reports/guided_reports.pl is updated; the template error key is simplified from duplicate_running_report_ids to a boolean duplicate_running_report (the ids were never displayed). Test plan: 1) Apply the previous Bug 41918 patches and this follow-up. 2) Set duplicate_running_reports_per_user_limit to 1 in koha-conf.xml. 3) Restart all the things. 4) Open a long-running saved report in two tabs and run it from both. 5) Verify the second tab shows "This report is already running..." 6) Set the limit to 0 and confirm both tabs run normally. 7) prove t/db_dependent/Reports.t still passes. -- You are receiving this mail because: You are watching all bug changes.