This question is based on the Server version of this question.
Sreenivasaraju P suggests to use ScriptRunner dateCompare function.
While using it in my Jira instance, however, I got the "Field: resolutionDate is not valid".
Am I doing something wrong? Does this depend on a specific Scriptrunner version?
The feature is supposed to work in both Cloud and Server version.
I found a solution and I have an assumption for the problem in my case.
The query worked when adding a subquery (in this case, making explicit the project I was looking at).
I'd assume that at least one project in my domain does not have this field and thus the error.