Bug 33017

Summary: SQL comments are not fully ignoring runtime parameters
Product: Koha Reporter: David Roberts <david.roberts>
Component: ReportsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, r.delahunty
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Roberts 2023-02-21 00:29:11 UTC
If you use SQL comments in a report, runtime parameters are not fully ignored. For example:

/* WHERE branchcode = <<Library|branches>> */

When the report runs, it correctly ignores this parameter, but it still requires the a library branch to be selected before the report can run.
Comment 1 David Cook 2025-03-11 04:46:28 UTC
I noticed this yesterday as well. 

Unfortunately, I can't really think of a solution for this, since we don't have a SQL parser in Koha. There's no robust way of knowing the runtime parameter, which is a Koha only non-SQL concept, is in a comment or not.