Bug 23389 - Add 'All' option to report value dropdowns
Summary: Add 'All' option to report value dropdowns
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Katrin Fischer
URL:
Keywords: Manual
Depends on:
Blocks:
 
Reported: 2019-07-27 12:15 UTC by Nick Clemens
Modified: 2019-11-26 16:52 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
This enhancement adds the ability to optionally include an `all` option in report placeholders allowing for an 'All' option to be displayed in filter select lists. **Usage**: `WHERE branchcode LIKE <<Branch|branches:all>>`
Version(s) released in:
19.11.00


Attachments
Bug 23389: Add 'All' option to report dropdowns (1.75 KB, patch)
2019-07-27 12:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23389: Add 'All' option to report dropdowns (5.36 KB, patch)
2019-07-30 15:30 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23389: Add 'All' option to report dropdowns (5.41 KB, patch)
2019-07-30 21:02 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 23389: Add 'All' option to report dropdowns (5.47 KB, patch)
2019-10-03 11:09 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-07-27 12:15:29 UTC
Sometimes you may want to have a report optionally limit to an itemtype or branch etc.

It would be nice to have an 'All' option in the report dropdowns
Comment 1 Nick Clemens 2019-07-27 12:18:45 UTC
Created attachment 91848 [details] [review]
Bug 23389: Add 'All' option to report dropdowns

This patch adds and 'all' option t rpeort dropdowns

Note you will need to use 'LIKE' instead of '=' to allow 'All' to work

To test:
 1 - Write a report:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches>>
 2 - Run it
 3 - Select a branch
 4 - You get one branch info
 5 - Note you cannot select all
 6 - Apply patch
 7 - Run report
 8 - Select 'All'
 9 - You get all branches
10 - Select one branch
11 - You get one branch
Comment 2 George Williams (NEKLS) 2019-07-29 21:24:53 UTC
I like the idea, but I have some reports that, if my staff were to run with "All" as the option, would overload our system.  Is there a way you can write this so that "All" is optional?  Like if you could add some kind of flag after a second pipe or something that.  Something like "<<Branch|branches>>" doesn't give you the "All" option but "<<Branch|branches|all>>" does give you the "All" option?
Comment 3 Nick Clemens 2019-07-30 15:30:26 UTC
Created attachment 91881 [details] [review]
Bug 23389: Add 'All' option to report dropdowns

This patch optionally adds an 'all' option to report dropdowns

Note you will need to use 'LIKE' instead of '=' to allow 'All' to work

To test:
 1 - Write a report:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches>>
 2 - Run it
 3 - Select a branch
 4 - You get one branch info
 5 - Note you cannot select all
 6 - Apply patch
 7 - Run report
 8 - No change
 9 - Update report like:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches:all>>
10 - Run report
11 - Select 'All'
12 - You get all branches
13 - Select one branch
14 - You get one branch
15 - Test with other authorised categories (itemtypes, YES_NO, etc.)
16 - Confirm it works as expected
17 - Prove -v t/db_dependent/Reports/Guided.t
Comment 4 ByWater Sandboxes 2019-07-30 21:02:06 UTC
Created attachment 91887 [details] [review]
Bug 23389: Add 'All' option to report dropdowns

This patch optionally adds an 'all' option to report dropdowns

Note you will need to use 'LIKE' instead of '=' to allow 'All' to work

To test:
 1 - Write a report:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches>>
 2 - Run it
 3 - Select a branch
 4 - You get one branch info
 5 - Note you cannot select all
 6 - Apply patch
 7 - Run report
 8 - No change
 9 - Update report like:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches:all>>
10 - Run report
11 - Select 'All'
12 - You get all branches
13 - Select one branch
14 - You get one branch
15 - Test with other authorised categories (itemtypes, YES_NO, etc.)
16 - Confirm it works as expected
17 - Prove -v t/db_dependent/Reports/Guided.t

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 5 Lisette Scheer 2019-07-30 21:11:12 UTC
I came here to change to signed off and realized I totally skipped the prove step, which I don't believe I can do on the sandboxes. 

Lisette
Comment 6 Katrin Fischer 2019-07-30 21:21:26 UTC
Hi Lisette, that's ok - we can take care of that step in QA. Please switch :)
Comment 7 Katrin Fischer 2019-10-03 11:09:53 UTC
Created attachment 93555 [details] [review]
Bug 23389: Add 'All' option to report dropdowns

This patch optionally adds an 'all' option to report dropdowns

Note you will need to use 'LIKE' instead of '=' to allow 'All' to work

To test:
 1 - Write a report:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches>>
 2 - Run it
 3 - Select a branch
 4 - You get one branch info
 5 - Note you cannot select all
 6 - Apply patch
 7 - Run report
 8 - No change
 9 - Update report like:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches:all>>
10 - Run report
11 - Select 'All'
12 - You get all branches
13 - Select one branch
14 - You get one branch
15 - Test with other authorised categories (itemtypes, YES_NO, etc.)
16 - Confirm it works as expected
17 - Prove -v t/db_dependent/Reports/Guided.t

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2019-10-03 11:10:04 UTC
Love!
Comment 9 Martin Renvoize 2019-10-07 13:10:34 UTC
Nice work!

Pushed to master for 19.11.00