Bug 20704 - Add borrower attribute types as run time parameters in reports
Summary: Add borrower attribute types as run time parameters in reports
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-03 14:12 UTC by Barton Chittenden
Modified: 2020-04-05 00:49 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barton Chittenden 2018-05-03 14:12:06 UTC
Feature request: add <<*|attribute_type>> as a run time parameter. This would list the values from borrower_attribute_types.description in a drop down, and choose the corresponding value of borrower_attribute_types.code.

For example, let's say that we had the following values in borrower_attribute_types:

+--------------------+----------+
| description        | code     |
+--------------------+----------+
| Drivers License    | DL       |
| Favourite Colour   | FAVCOLOR |
| PC Allowed         | PC       |
| Previous system ID | PREVID   |
+--------------------+----------+

Then we could write queries like:

SELECT
    firstname,
    surname,
    cardnumber,
    attribute
FROM
    borrowers
    INNER JOIN borrower_attributes USING (borrowernumber)
WHERE
    borrower_attributes.code = <<Borrower attribute type|attribute_type>>

When run, the user would be prompted for 'Borrower attribute type', and would get a drop down containing

+--------------------+
| Drivers License    |
| Favourite Colour   |
| PC Allowed         |
| Previous system ID |
+--------------------+