A Filter on a Date field which has been aggregated using the MAXIMUM function does not recognise that the result is a date, and does not allow date expressions such as '1 year ago'.
I have a query which searches for instances of EntityA, which has a relationship to none or more instances of EntityB. I wish to select only those EntityA which do not have an EntityB with a particular Date field greater than 1 year ago.
I can aggregate on EntityA Id, and set the Date field on EntityB to use the MAXIMUM aggregation function. That's fine and shows the latest related date correctly. I can define a Filter on the MAX Date field, but this does not show the date-related options that one gets when filtering a date field without aggregation. If one sets the filter to 'Less than' and '1 year ago' or '-1 year' it creates a HAVING clause but passes the date expression straight through to the SQL comparison as a literal, which of course does not work.
Views Filters should recognise that appropriate aggregation functions on a Date field return Dates, and provide the same filtering options as non-aggregated dates.
Active
3.24
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.