Bug 16002

Summary: MULTI choices in report dropdowns
Product: Koha Reporter: Christopher Brannon <cbrannon>
Component: ReportsAssignee: Galen Charlton <gmcharlt>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andrewfh, caroline.cyr-la-rose, hebah, katrin.fischer
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Christopher Brannon 2016-03-07 17:28:41 UTC
When adding choices like <<branches>> to a report, it would be great if parameter could be added to the choice where ALL could be a choice at the top of the list.  Maybe something like <<branches{ALL}>>.

Similarly, it would be great if MULTI could also be a parameter, where the user could select several items from the list, like <<branches{MULTI}>>.

Christopher
Comment 1 Katrin Fischer 2016-03-07 18:43:07 UTC
Hi Christopher, I think the problem is in how to make this work with the SQL query. <<branches>> is usually used with =, multi could be used with 'in (....)', but not sure how how to make an 'all' work in a good way.
Comment 2 Katrin Fischer 2020-01-08 23:55:28 UTC
ALL is done now by bug 23389
Comment 3 Christopher Brannon 2020-01-09 00:12:15 UTC
Great!  Half way there.  Now, if we could repeat the process of bug 23389 and give the option of <<branch|branches:multi>> where that would allow you to select several branches of your choosing, that would be fantastic.
Comment 4 Katrin Fischer 2020-02-03 21:34:09 UTC
*** Bug 24568 has been marked as a duplicate of this bug. ***
Comment 5 hebah 2022-08-05 15:34:08 UTC
This would be a great addition to reporting and a request I've been seeing a lot of recently in reports.
Comment 6 Christopher Brannon 2022-08-05 17:16:41 UTC
(In reply to Katrin Fischer from comment #1)
> Hi Christopher, I think the problem is in how to make this work with the SQL
> query. <<branches>> is usually used with =, multi could be used with 'in
> (....)', but not sure how how to make an 'all' work in a good way.

It seems like if you could do something like:

homebranch IN (<<Branch|branches:all>>)

If Koha could detect the parameter was in an IN statement, maybe it could use a dropdown that allows multiple selections.  And if the all selection is made, all the selections would be in the IN statement.  There would just need to be some logic to handle what to do if ALL was one of the multiple selections so it doesn't create strange results.
Comment 7 Andrew Fuerste-Henry 2024-01-22 15:36:44 UTC

*** This bug has been marked as a duplicate of bug 35746 ***