CiviGrant Date Fields no longer respect relative dates in Advanced Search
Steps to reproduce:
- Install new buildkit site on master branch (I used wordpress demo)
- Enabled the CiviGrant extension packed with Core
- Navigate to Advanced Search and expand the "Grants" tab
- Pick a date field such as "Grant Money transfer date" and choose a relative date such as "This Calendar Year"
- Click "Search" and observe no "Where" clauses have been applied to the results
- Choose a date range from "Jan 1" to whatever today is and observe the search works this way, but not with the relative date
Details:
I have a feeling this has something to do with the grant component being packing into an extension, but i'm not quite sure how yet. Any ideas quite welcome! I could put some dev time into fixing if nobody has an idea yet.
What I have observed is that the advanced search FORM itself is outputting the correct formValues array when compared to a contribution field with a relative date that DOES work, i.e.
["grant_money_transfer_date_relative"]=> string(9) "this.year" ["grant_money_transfer_date_low"]=> string(0) "" ["grant_money_transfer_date_high"]=> string(0) ""
vs
["receive_date_relative"]=> string(9) "this.year" ["receive_date_low"]=> string(0) "" ["receive_date_high"]=> string(0) ""
(a contribution receive date field with relative date)
The same array also reaches /ext/civigrant/CRM/Grant/BAO/Query.php and i'm not quite sure where it goes after that but something about that processing is not getting "grant_money_transfer_date_relative" translated into a "where" query in SQL.