Details
-
Bug
-
Status: Done
-
Critical
-
Resolution: Done
-
6.3.0-p5, 6.5.0-p5
-
SR4J Sprint 90
-
0.8
Description
Steps to Reproduce
- Add two date fields to a project one for Delivery Date and another for Expected Date
- Name either one or both of the date fields with a - i.e. dash symbol. For example Expected-Date
- Create a few tickets with sample data and set the date values for these fields
- Run a JQL query to filter the issue using the issueFunction in dateCompare filter
issueFunction in dateCompare("","Expected-Date > Delivery Date")
Current Behaviour
- When the JQL Query is executed an error message is returned i.e.,
Scripted function "dateCompare" compilation failure. Contact administrator and check logs. Message: Field name: Expected not found or not a date or datetime.
as shown in the image below:-
and an error message is displayed in the log2020-08-06 17:49:33,998+0800 http-nio-9091-exec-14 ERROR admin 1069x1060x2 1pa1plw 0:0:0:0:0:0:0:1 /rest/issueNav/1/issueTable [c.o.j.groovy.jql.ScriptedJqlFunction] Script error for function: dateCompare. java.lang.Exception: Field name: Expected not found or not a date or datetime. at com.onresolve.jira.groovy.jql.DateCompare.resolveField(DateCompare.groovy:215) at com.onresolve.jira.groovy.jql.DateCompare.dateWindowParser(DateCompare.groovy:167) at com.onresolve.jira.groovy.jql.DateCompare$dateWindowParser$0.callCurrent(Unknown Source) at com.onresolve.jira.groovy.jql.DateCompare.dateCompareParser(DateCompare.groovy:231) at com.onresolve.jira.groovy.jql.DateCompare$dateCompareParser.callCurrent(Unknown Source) at com.onresolve.jira.groovy.jql.DateCompare.extractParameters(DateCompare.groovy:237) at com.onresolve.jira.groovy.jql.DateCompare.validate(DateCompare.groovy:41) at com.onresolve.jira.groovy.jql.JqlFunction$validate$6.call(Unknown Source) at com.onresolve.jira.groovy.jql.ScriptedJqlFunction.validate(ScriptedJqlFunction.groovy:117)