https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25548
Agustín Moyano <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #36 from Agustín Moyano <[email protected]> --- (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. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
