Bug 27712

Summary: Cannot use date parameters in SQL reports
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: ReportsAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, 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:
Bug Depends on: 27380    
Bug Blocks:    

Description Joonas Kylmälä 2021-02-16 08:57:41 UTC
Using the date parameter in SQL report doesn't work anymore after bug 27380 was merged, reverting the patches fixes problem. I'm not exactly sure what is it that causes the problem, Nick do you have any idea?

To reproduce the problem create a new SQL report:

> select * from biblio where datecreated = <<Day|date>>

and then run it with whatever date and you should get the error:

> Can't locate object method "_columns" via package "02/16/2021" (perhaps you 
> forgot to load "02/16/2021"?) at /kohadevbox/koha/Koha/Object.pm line 810
Comment 1 Jonathan Druart 2021-02-16 09:16:25 UTC
I've added a fix on bug 27380 (Add missing use statement)
Comment 2 Joonas Kylmälä 2021-02-16 09:23:16 UTC
Applying the patch from there fixes the issue indeed, thanks Jonathan for the super fast patch! :)