Bug 40500 - Include credit/debit type code in runtime parameter selection dropdown for reports
Summary: Include credit/debit type code in runtime parameter selection dropdown for re...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Andrew Fuerste-Henry
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-24 17:47 UTC by Andrew Fuerste-Henry
Modified: 2025-07-25 13:31 UTC (History)
2 users (show)

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


Attachments
Bug 40500: Include credit and debit codes in runtime dropdown (2.14 KB, patch)
2025-07-24 18:35 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40500: Include credit and debit codes in runtime dropdown (2.53 KB, patch)
2025-07-24 19:21 UTC, Andrew Fuerste-Henry
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 2025-07-24 17:47:52 UTC
When one sets a runtime parameter in a report for credit or debit type, the dropdown one gets at runtime only includes the description. In many cases it'd be helpful to also include the code itself.
Comment 1 Andrew Fuerste-Henry 2025-07-24 18:35:01 UTC
Created attachment 184602 [details] [review]
Bug 40500: Include credit and debit codes in runtime dropdown

To test:
1 - save and run a sql query using both debit type and credit type parameters
2 - run your report and see your dropdowns only include desciptions
3 - apply patch, restart services
4 - re-run your report and see your dropdowns have both the description and the code
Comment 2 Andrew Fuerste-Henry 2025-07-24 19:21:38 UTC
Created attachment 184603 [details] [review]
Bug 40500: Include credit and debit codes in runtime dropdown

To test:
1 - save and run a sql query using both debit type and credit type parameters
2 - run your report and see your dropdowns only include desciptions
3 - apply patch, restart services
4 - re-run your report and see your dropdowns have both the description and the code
Comment 3 Andrew Fuerste-Henry 2025-07-25 13:31:06 UTC
Nick suggested this would make sense as an option to be set in the parameter, applicable to all types of parameters. Something like "<<Debit type|debit_types:show_codes". This sounds like a good approach, but is more complicated than I can figure out just now.

The current options ":in" and ":all" are exclusive so the code only knows how to take one option at a time. We'd want to be able to combine ":show_code" with either of the other two options.