Bug 35856

Summary: Runtime parameter modal should provide option of ":all"
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: ReportsAssignee: Brendan Lawlor <blawlor>
Status: Needs documenting --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: blawlor, caroline.cyr-la-rose, fridolin.somers, lucas, martin.renvoize, nick, phil, philip.orr
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This patch adds radio checkboxes to the runtime parameter modal menu used in creating SQL reports to allow the runtime parameter to use multiple values ("... in the following list of values") or to allow choosing all values ("... in all the values"). Now when you use the modal menu for inserting a runtime parameter while creating an SQL report you can simply click on the radio button for "single parameter only", "include option for all" or "allow multiple selections" after choosing the runtime parameter you want to add.
Version(s) released in:
24.05.00
Circulation function:
Bug Depends on: 35746    
Bug Blocks:    
Attachments: Bug 35856: added options to runtime parameter modal
Bug 35856: added options to runtime parameter modal
Bug 35856: added options to runtime parameter modal
Bug 35856: added options to runtime parameter modal
Bug 35856: added options to runtime parameter modal
Bug 35856: (follow-up) Expand display of radio button choices

Description Andrew Fuerste-Henry 2024-01-22 15:31:04 UTC
The modal interface to insert a runtime parameters should offer the option to make one's parameter offer the "All" option. Currently, use of the All feature requires one to manually add ":all" at the end of the parameter and is not clearly suggested by anything in the interface. The modal could include a checkbox one could check to add ":all" to the constructed parameter. It would probably be helpful to display some text reminding the user that one must use LIKE rather than = with ":all."

I've made this depend on bug 35746, which adds an ":in" option. If that gets pushed, it'd be great to have it included as an option in the modal, too.
Comment 1 Brendan Lawlor 2024-01-24 18:02:22 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass (lukeg) 2024-01-25 23:46:22 UTC
Should this be 'Signed-off'? I don't see am attached patch/sign-off line. Setting this back to NSO.
Comment 3 Caroline Cyr La Rose 2024-02-20 17:31:03 UTC Comment hidden (obsolete)
Comment 4 Caroline Cyr La Rose 2024-02-20 17:32:07 UTC
Very exciting!

In documentation, we should mention that :in requires IN and :all requires LIKE. Otherwise, the reports don't work.
Comment 5 Brendan Lawlor 2024-02-20 17:47:50 UTC Comment hidden (obsolete)
Comment 6 Brendan Lawlor 2024-02-20 17:51:10 UTC
Thanks Caroline!

I just made a small update to the patch that adds a default check box for choosing a single parameter plus some tool tips to explain the need for using =, LIKE and IN in the query expression.
Comment 7 Caroline Cyr La Rose 2024-02-20 20:36:26 UTC Comment hidden (obsolete)
Comment 8 Caroline Cyr La Rose 2024-02-20 20:37:22 UTC
Thanks Brendan! 

I was mentioning it for the documentation team when we'll add it to the manual, but this is good too! :)

Caroline
Comment 9 Nick Clemens (kidclamp) 2024-03-28 11:35:12 UTC
Created attachment 164050 [details] [review]
Bug 35856: added options to runtime parameter modal

This patch adds radio checkboxes to the reports runtime parameter modal for adding param options :all and :in.

The :in param option functionality depends on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35746

Test plan:
1. Apply patch
2. Create a report from SQL
3. Click Insert runtime parameter and choose any option other than date, list or text field
4. Note the form now includes a radio checkbox for parameter options
5. Choose 'Include option for all' and click Insert parameter
6. Note the parameter is inserted with :all option like <<label|authval:all>>
7. Choose 'Allow multiple selections' and click Insert parameter
8. Note the parameter is inserted with :in option like <<label|authval:in>>
9. Make sure that parameter options are not included on the form for date, list and text field

Thanks!

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Owen Leonard 2024-04-02 17:24:13 UTC
Created attachment 164287 [details] [review]
Bug 35856: (follow-up) Expand display of radio button choices

This patch swaps out the icons with tooltips with visible hints,
expanding the radio button options to hopefully make it more readable.
Comment 11 Brendan Lawlor 2024-04-03 16:46:10 UTC
Thanks Owen! I like the vertical layout of the radio buttons. It's much easier to read.
Comment 12 Katrin Fischer 2024-04-22 10:03:58 UTC
Depends on a patch currently in Failed QA - please bring these back to my queue soon!
Comment 13 Katrin Fischer 2024-04-29 06:48:12 UTC
I struggle a tiny bit with the phrasing "Query expression". 
Hm, but what to write instead? A suggestion:
Query condition must use ... operator.
What do you think?

(setting additional_work_needed to highlight the question)
Comment 14 Katrin Fischer 2024-04-29 07:38:23 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 15 Fridolin Somers 2024-05-24 09:05:48 UTC
Not backported to 23.11.x
Comment 16 Martin Renvoize (ashimema) 2024-06-14 08:29:39 UTC
Anyone have an opinion here for Katrins comment?
Comment 17 Katrin Fischer 2024-11-14 15:16:09 UTC
(In reply to Katrin Fischer from comment #13)
> I struggle a tiny bit with the phrasing "Query expression". 
> Hm, but what to write instead? A suggestion:
> Query condition must use ... operator.
> What do you think?
> 
> (setting additional_work_needed to highlight the question)

Dropping this. We can deal with it later, if someone wants to change it.