invalid jql query - boolean validator - stopped working after upgrading to 2.2.34

Issue #549 resolved
Sebastian Wagner created an issue

Hi Fidel,

i updated JWT to 2.2.34 yesterday and keep getting the following error when trying to execute a transition:

INVALID JQL QUERY IN "VALIDATION ON JQL QUERY": "issuekey = " : com.atlassian.jira.jql.parser.antlr.RuntimeRecognitionException: org.antlr.runtime.RecognitionException

the transition got a boolean validator: issueKeysToIssueList(%{14707}) IN issuesFromJQL("project = \"OPSCM\" and \"Ist Standard Change\" is not empty")

Any idea how to fix this? I already downgraded to 2.2.33 but no change. :(

Cheers

Sebastian

Comments (10)

  1. Sebastian Wagner reporter

    Tried to upgrade in my test- and dev-envi. No problem! Works like a charm even with 2.2.34!

    I don't know what's wrong wih this on production site. :(

  2. Sebastian Wagner reporter

    HA! the boolean validator wasn't the problem! two postfunctions where added and these produced the error:

    copy parsed text in adv mode:

    target field: Risk 14717

    first(fieldValue(%{14717}, issuesFromJQL("issuekey = " + first(findPatternIgnoreCase(%{14714}, "OPSCM-\d+")))))

    target field: Impact 14713

    first(fieldValue(%{14713}, issuesFromJQL("issuekey = " + first(findPatternIgnoreCase(%{14714}, "OPSCM-\d+")))))

    After removing those, the transition worked. Any idea how to get those two back to work properly? :)

    Cheers

    Sebastian

  3. Fidel Castro Armario repo owner

    Hi Sebastian,

    Try escaping the backlash. Use the following expressions:

    first(fieldValue(%{14717}, issuesFromJQL("issuekey = " + first(findPatternIgnoreCase(%{14714}, "OPSCM-\\d+")))))
    

    and

    first(fieldValue(%{14713}, issuesFromJQL("issuekey = " + first(findPatternIgnoreCase(%{14714}, "OPSCM-\\d+")))))
    
  4. Sebastian Wagner reporter

    Hi Fidel,

    thanks for the fast response. I used the updated impressions but the error is still there: INVALID JQL QUERY IN "VALIDATION ON JQL QUERY": "issuekey = " : com.atlassian.jira.jql.parser.antlr.RuntimeRecognitionException: org.antlr.runtime.RecognitionException

    Cheers

    Sebastian

  5. Fidel Castro Armario repo owner

    We need to know which value is being returned by findPatternIgnoreCase(%{14714}, "OPSCM-\\d+").

    Please, use the "Copy a parsed text to a field" post-function in advanced parsing mode with "New comment" as target field, in order to find out the value returned by the following expression: toString(findPatternIgnoreCase(%{14714}, "OPSCM-\\d+")).

    Let me know the value returned.

    Tell me also the original value of field %{14714}.

  6. Fidel Castro Armario repo owner

    I assume that you want the expression to cope with the fact that field %{14714} may not content an issue key. In order to do that use the following expression:

    count(findPatternIgnoreCase(%{14714}, "OPSCM-\\d+")) > 0 ? first(fieldValue(%{14717}, issuesFromJQL("issuekey = " + first(findPatternIgnoreCase(%{14714}, "OPSCM-\\d+"))))) : null
    
  7. Sebastian Wagner reporter

    The more we're into this issue, the more i'm asking myself what's the purpose of the postfunctions. Of what i understand those thinks should originally copy field values from an issue mentioned in the issue. But not with this expression. So this is somewhat stupid! :D

    Fidel, sorry for wasting your time with this. :( I think simply deleting those postfuntions is the best solution.

    I'll try to figure out why those postfunctions where added.

    Thanks a lot for your help!

    Cheers

    Sebastian

  8. Log in to comment