Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL filter in Automation rule

Gonzalo Benitez de lugo
Contributor
October 26, 2020

The filter [Dev] Tickets in Open Sprints filters the issues included in Open Sprints:

  • JQL:
    project = xxx AND (issuetype = Story OR issuetype = Task OR issuetype = Bug) AND sprint in openSprints() ORDER BY created DESC

 

I created a rule that does:

  1. When the field [SPRINT] is edited…
  2. If ISSUE is included in the filter [Dev] Tickets in Open Sprints…
  3. Add a [LABEL] to SUBTASKS

See a screenshot of the rule below these lines. 

*** Problem ***

I'm getting the following error in the Audit log when the rule is run:

  • Action details:
    JQL condition
    No subsequent actions were performed since JQL condition did not pass due to error running JQL:
    "(key = xxx-384 AND ("[Dev] Tickets in Open Sprints" = True))" - Error in the JQL Query: 'True' is a reserved JQL word. You must surround it in quotation marks to use it in a query. (line 1, character 55)

I don't know how to say:

  • "JQL Condition = True"
  • …meaning that if the issue is included in the filter, then perform…

 

image.png image.png

Notes:

  • I checked this topic to confirm that it can be done but didn't get a solution to my issue

1 answer

1 accepted

1 vote
Answer accepted
Manon Soubies-Camy
Community Champion
October 26, 2020

Hi @Gonzalo Benitez de lugo,

You should actually use the filter id in your JQL query, you can find it in the URL:

Capture d’écran 2020-10-26 à 12.00.27.png

In this example, the filter id is 10120 so I can use the following JQL query in an automation rule:

filter = 10120

This will get all issues resulting from the filter query.

Hope this helps,

- Manon

Gonzalo Benitez de lugo
Contributor
October 26, 2020

thanks for the clear and quick answer. Worked perfectly!

Like Manon Soubies-Camy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events