Bug 29328: Add missing list parameter to reports parameter menu
authorOwen <oleonard@myacpl.org>
Thu, 28 Oct 2021 15:45:21 +0000 (15:45 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 2 Nov 2021 15:50:01 +0000 (16:50 +0100)
commitc0a000d5df14c679753e670b94517cf2e8a756f4
treebf8323356f1f064215e32d11452cacf85a2d0fd4
parente9c4fe3d9f301d694228882b175296b419ad4ff7
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt