Bug 29328 - Add missing list parameter to reports parameter menu
Summary: Add missing list parameter to reports parameter menu
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 27380 27644
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-26 18:33 UTC by Andrew Fuerste-Henry
Modified: 2022-06-06 20:27 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05


Attachments
Bug 29328: Add missing list parameter to reports parameter menu (2.62 KB, patch)
2021-10-28 16:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29328: Add missing list parameter to reports parameter menu (2.69 KB, patch)
2021-10-28 17:21 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 29328: Add missing list parameter to reports parameter menu (2.75 KB, patch)
2021-10-31 00:31 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 Andrew Fuerste-Henry 2021-10-26 18:33:54 UTC
The new List parameter isn't included in the new Insert Parameter dropdown. It should be.
Comment 1 Owen Leonard 2021-10-28 16:02:17 UTC
Created attachment 127065 [details] [review]
Bug 29328: Add missing list parameter to reports parameter menu

This patch adds an option to insert "list" as a runtime parameter in SQL
reports (As added by Bug 27380).

To test, apply the patch and go to Reports -> Create from SQL.

- Click the "Insert runtime parameter" button and select
  "List."
- Customize the parameter label if you wish and click "Insert
  parameter."
- The parameter should be inserted like this:

  <<List of values|list>>

- Use it to create a valid SQL report, for example:

  SELECT * FROM borrowers WHERE categorycode IN  <<List of values|list>>
  LIMIT 10

- Confirm that upon running the report you are shown a textarea. Enter
  two or more values in the textarea, each on a separate line.
- Confirm that the report runs correctly. The SQL above would show you
  this when you click "Show SQL code":

  SELECT * FROM borrowers WHERE categorycode IN  ('A','S')  LIMIT 10
Comment 2 Andrew Fuerste-Henry 2021-10-28 17:21:03 UTC
Created attachment 127068 [details] [review]
Bug 29328: Add missing list parameter to reports parameter menu

This patch adds an option to insert "list" as a runtime parameter in SQL
reports (As added by Bug 27380).

To test, apply the patch and go to Reports -> Create from SQL.

- Click the "Insert runtime parameter" button and select
  "List."
- Customize the parameter label if you wish and click "Insert
  parameter."
- The parameter should be inserted like this:

  <<List of values|list>>

- Use it to create a valid SQL report, for example:

  SELECT * FROM borrowers WHERE categorycode IN  <<List of values|list>>
  LIMIT 10

- Confirm that upon running the report you are shown a textarea. Enter
  two or more values in the textarea, each on a separate line.
- Confirm that the report runs correctly. The SQL above would show you
  this when you click "Show SQL code":

  SELECT * FROM borrowers WHERE categorycode IN  ('A','S')  LIMIT 10

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 Katrin Fischer 2021-10-31 00:31:12 UTC
Created attachment 127119 [details] [review]
Bug 29328: Add missing list parameter to reports parameter menu

This patch adds an option to insert "list" as a runtime parameter in SQL
reports (As added by Bug 27380).

To test, apply the patch and go to Reports -> Create from SQL.

- Click the "Insert runtime parameter" button and select
  "List."
- Customize the parameter label if you wish and click "Insert
  parameter."
- The parameter should be inserted like this:

  <<List of values|list>>

- Use it to create a valid SQL report, for example:

  SELECT * FROM borrowers WHERE categorycode IN  <<List of values|list>>
  LIMIT 10

- Confirm that upon running the report you are shown a textarea. Enter
  two or more values in the textarea, each on a separate line.
- Confirm that the report runs correctly. The SQL above would show you
  this when you click "Show SQL code":

  SELECT * FROM borrowers WHERE categorycode IN  ('A','S')  LIMIT 10

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-11-02 15:54:17 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 5 Kyle M Hall 2021-11-05 14:52:36 UTC
Pushed to 21.05.x for 21.05.05
Comment 6 Fridolin Somers 2021-11-11 01:31:08 UTC
Depends on Bug 27380 not in 20.11.x