[Koha-bugs] [Bug 25548] Package install Apache performs unnecessary redirects

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 14 23:42:06 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25548

Agustín Moyano <agustinmoyano at theke.io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |agustinmoyano at theke.io

--- Comment #36 from Agustín Moyano <agustinmoyano at theke.io> ---
(In reply to Tomás Cohen Arazi from comment #35)
> This did actually break sql reports with empty parameters.

Yes, we just found out this was the reason why filtered reports didn't work as
expected when leaving blank inputs... For example, If you define a report like
this:

select <<Library|branches:all>> as lib, 
           <<Item type|itemtypes:all>> as itype,
           <<CC|CC:all>> as cc,
           <<Date from>> as date_from,
           <<Date to>> as date_to,
           <<Invoice>> as invoice

and submit the form with one parameter.. for example the one that says
'Invoice' the form posts to the report with the following query string
parameters:

reports: 41
phase: Run this report
param_name: Library|branches:all
sql_params: %
param_name: Item type|itemtypes:all
sql_params: %
param_name: CC|CC:all
sql_params: %
param_name: Date from
sql_params: 
param_name: Date to
sql_params: 
param_name: Invoice
sql_params: invoice_1 


But after redirection, empty parameters are filtered, leaving things like this

reports: 41
phase: Run this report
param_name: Library|branches:all
sql_params: %
param_name: Item type|itemtypes:all
sql_params: %
param_name: CC|CC:all
sql_params: %
param_name: Date from
param_name: Date to
param_name: Invoice
sql_params: invoice_1

Notice missing sql_params. This ended up the query to be built like this:

select '%' as lib, 
           '%' as itype,
           '%' as cc,
           'invoice_1' as date_from,
           NULL as date_to,
           NULL as invoice

notice that 'invoice_1' is placed in date_from instead of invoice column.

This fix is more awesome than you realized, ;)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list