Bug 33017 - SQL comments are not fully ignoring runtime parameters
Summary: SQL comments are not fully ignoring runtime parameters
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: 2023-02-21 00:29 UTC by David Roberts
Modified: 2025-03-11 04:46 UTC (History)
2 users (show)

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 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.