Bug 29351: Add missing cn_source parameter to reports parameter menu
authorOwen <oleonard@myacpl.org>
Thu, 28 Oct 2021 14:15:12 +0000 (14:15 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 2 Nov 2021 15:50:01 +0000 (16:50 +0100)
commit07464b53ed303d8d62d793db385aaa5b9a42e960
treeafd6ec62c9d1f355fb218c920a140ab5b76a17bd
parentca6c81ec5cff9ad626787b2cf48aa99a3c217e70
Bug 29351: Add missing cn_source parameter to reports parameter menu

This patch adds an option to insert "Source of classification or
shelving scheme" as a runtime parameter in SQL reports. The ability to
use cn_source as a parameter seems to have always been part of this
feature but wasn't documented.

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

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

   <<Source of classification or shelving scheme|cn_source>>

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

   SELECT * FROM items WHERE cn_source = <<Source of classification or
   shelving scheme|cn_source>> LIMIT 10

 - Confirm that upon running the report you are prompted to select a
   classification source.
 - Confirm that the report runs correctly.

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