| Summary: | Misleading choices from reports error when runtime parameter is named incorrectly | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Andrew Fuerste-Henry <andrew> |
| Component: | Reports | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | blawlor, jonathan.druart |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | --- | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
|
Description
Andrew Fuerste-Henry
2020-08-28 13:12:04 UTC
Looks ok for me on master (the SELECT is in the SQL textarea), did you test on master? I just tested this on master a bit. There's some inconsistency in behavior here, perhaps based on complexity of the report?
My original example of "SELECT <<whatever|whatever>>" does not drop any content when you try to save it.
If I try to save a report of:
SELECT if(1=1,'dur','ohno')
WHERE poodle=<<dog|woof>>
I click save, get the parameter error message, click "save anyway," end up with:
SELECT if(1=1,
Or, for a less silly example, this report has "branch" where it should say "branches":
SELECT itemtypes.description as itemtype,
branchname,
sum(if(type='issue',1,0)) as issues,
sum(if(type='renew',1,0)) as renews
FROM statistics
LEFT JOIN itemtypes USING (itemtype)
LEFT JOIN branches ON (statistics.branch=branches.branchcode)
WHERE date(datetime) BETWEEN <<Start date|date>> AND <<End date|date>>
AND branch like <<Branch|branch:all>>
GROUP BY itemtype, branch
And after trying to save it I end up with:
SELECT itemtypes.description as itemtype,
branchname,
sum(if(type=
Altogether, I'd be happy see to see this check and error message moved to when a report is run, rather than when it's saved. |