Bug 32309

Summary: Store saved_reports values as hash
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: ReportsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

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"]