[Bug 39622] New: Create a method for sharing 1 runtime parameter value across multiple runtime parameter placeholders
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39622 Bug ID: 39622 Summary: Create a method for sharing 1 runtime parameter value across multiple runtime parameter placeholders Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Currently, if you want to add 1 date to a complex query at runtime, you'll probably have to make 2+ runtime parameters, so you'll get prompted for 2+ values at runtime, and you'll just have to remember that they need to be identical. What if we had a way of tagging a runtime parameter, so that you only got asked for it 1 time? That could improve UX and reduce human error. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39622 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- I'm thinking that we could add an optional 2nd pipe (ie |) which lets you link runtime parameters together. Someone manually writing it could just do something like <<Start date|date|sdate123>> and use that same runtime parameter a couple of times in the query. With the "Insert runtime parameter" button, we might be able to do something clever in terms of auto-generating that linkage. Providing the friendly labels in a dropdown list, and just autogenerating the linking/tag value. -- I don't have a real plan for this, but it's just something that popped into my head while I was helping someone with a report involving runtime parameters for 1 date that has to be applied across different subqueries. I know we have "Runtime Variables" but those are actually MySQL/MariaDB session variables, and they can be problematic. Since they live beyond the life of that SQL query, it's always possible that they'll get re-used in a different SQL query. Or - as noted on the wiki - they can sometimes be optimized away. I've seen too many problems with these to really advocate for them for production data reports. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39622 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Technically, I guess we could group them by the friendly label as well, but that would be a big behaviour change from what people are used to, so I'm not so sure about that. I suppose we could always have a system preference for it with a checkbox that lets you group together parameters. Not sure. Just putting some ideas out there. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39622 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi David, this already works if you use the same label. Koha will only show the input once, but will use the value for every placeholder that has the same "name". -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39622 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I hope I am not misunderstanding, but say you have something like: WHERE date_due = <<Date|date>> and issue_date between <<Date|date>> You will only be prompted for Date once. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39622 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #3)
Hi David, this already works if you use the same label. Koha will only show the input once, but will use the value for every placeholder that has the same "name".
(In reply to Katrin Fischer from comment #4)
I hope I am not misunderstanding, but say you have something like:
WHERE date_due = <<Date|date>> and issue_date between <<Date|date>>
You will only be prompted for Date once.
Thanks for that! I should've double-checked rather than relying on what appears to be a very old memory... Looking at the SQL Reports Library, it indicates that the runtime parameters work as you've described since 18.05. I think I'll update the wiki to make that note much more visible. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org