I'm trying to build a JQL query using the JqlClauseBuilder that calls the "issueFieldExactMatch" function provided by script runner. Just wondering how to call this function, because I can't seem to work it out?
This was my first attempt:
JqlClauseBuilder builder = JqlQueryBuilder.newClauseBuilder();
Query query = builder.project(projectId).and().issueType().in(VALID_ISSUETYPES as Long[]).and().not().issue(issue.getKey()).and().field("issueFunction").inFunc("issueFieldExactMatch", "", "summary", currentSummary).buildQuery()
but it seems to generate the following jql (note the missing empty string in the "subquery" argument):
project = "10000" AND issuetype in (10400,10401,10402,10403) AND issueFunction in issueFieldExactMatch(, summary, "Test")
What it should generate is:
project = "10000" AND issuetype in (10400,10401,10402,10403) AND issueFunction in issueFieldExactMatch("", summary, "Test")
I've tried various escape methods but none of them have worked. The closest I've come is "\\\"\\\"" which generates the following error:
com.atlassian.jira.jql.parser.antlr.RuntimeRecognitionException: NoViableAltException(-1@[478:1: operator returns [Operator operator] : ( EQUALS | NOT_EQUALS | LIKE | NOT_LIKE | LT | GT | LTEQ | GTEQ | IN | IS NOT | IS | NOT IN | WAS | WAS NOT | WAS IN | WAS NOT IN | CHANGED );])