Bug 32309 - Store saved_reports values as hash
Summary: Store saved_reports values as hash
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-21 16:54 UTC by Andrew Fuerste-Henry
Modified: 2022-11-21 16:54 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:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2022-11-21 16:54:39 UTC
When using the --store-results option in runreport.pl, the resulting stored data would be more easily usable if stored as a hash.

So, say we have a patron named Andrew Fuerste-Henry and a report "select surname, firstname from borrowers." Currently, that will show up in saved_reports as:

[["surname","firstname"],["Fuerste-Henry","Andrew"]]

That makes it hard to do something like find all the surnames connected to a given firstname.

The data would be easier to work with if we instead stored it as a hash, like:

["surname" : "Fuerste-Henry" , "firstname" : "Andrew"]