I'm creating a new Content View. I want to select documents where a date field (rule:Rule-ExpiringDate) is less than the current date plus 30 days. In other words, all documents that will expire within 30 days from today, including those already expired.
In the the Studio Content View -> Query filter, I tried this:
QUERY FILTER:
ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted' and ecm:parentId= ? and rule:Rule-ExpiringDate <= DATE ?
QUERY PARAMETERS:
#{currentDocument.id}
@{currentDate.days(30)}
Resulting in this error in Nuxeo:
Failed to execute query: java.lang.IllegalArgumentException: Invalid format: "@{currentDate.days(30)}" in query: SELECT * FROM Document WHERE ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted' and ecm:parentId= '7af53f00-181c-45af-921d-ccdd3bf2bab2' and rule:Rule-ExpiringDate <= DATE '@{currentDate.days(30)}' ORDER BY rule:Rule-ExpiringDate DESC
What is the correct Query Filter and Query Parameters?