Why is JQL Condition in Automation for Jira not reading properly?

Julia
Contributor
April 18, 2022

I am trying to use a JQL Condition in my Rule that identifies whether the trigger issue which is an Initiative, has any open children issues. When I use this JQL, it is reading the initial "issuekey" portion of the jQL as if it were trying to reference the trigger issue key.

See screenshots of my rule & the error. 

issuekey in childIssuesof(“{{triggerissue.key}}“) and statusCategory != Done

 

Screen Shot 2022-04-18 at 5.23.08 PM.pngScreen Shot 2022-04-18 at 5.23.23 PM.png

2 answers

0 votes
Filipi Lima
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 21, 2022

Hi, Julia and Trudy!

Julia, instead of using And: Issue matches JQL try using the Branch rule/related issues like below:
image.png

This way you can query stuff outside the scope of the initial condition.

Additionally, you may remove the And Issue Type = Initiative and And: Status = GA/Shipped as they're redundant - you're already doing that check on the trigger condition.

Let us know how it goes!

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2022

Can you please provide a screen image that shows the entire rule? We really need to see the full rule to debug what might be happening in this one step.

Is PT-4245 an example of the issue key for an Initiative that triggers this rule?

Julia
Contributor
April 19, 2022

Sure let me attach, the entire rule works properly up until that last step. Each of those Initiatives should be run through that JQL to see if they pass. Some should pass and other's shouldn't 

Julia
Contributor
April 19, 2022

Screen Shot 2022-04-19 at 8.13.38 AM.pngScreen Shot 2022-04-19 at 8.13.50 AM.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2022

Okay, so the way this is written the JQL is functioning properly, but does not do what you want it to do. The way the rule is constructed, the "And: issue matches JQL" is saying "and the issue that triggered this rule is in the output of this JQL statement." It is functioning correctly when it says that the triggering issue (the Initiative) is not found in the output of the JQL, because the JQL is returning just the children of that Initiative.

Instead of the And: Issue matches JQL you need

1. a new Action and use the Lookup Issue actions to execute your JQL. 

2. a new condition to check the number of issues returned by the lookup

Screen Shot 2022-04-19 at 11.08.05 AM.png

And then do your Send Email action

Julia
Contributor
April 19, 2022

Oh sadness, it looks like you're on cloud. The lookup action is not available on server.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2022

Oh, rats! I didn't notice that you're on jira server

Like Filipi Lima likes this

Suggest an answer

Log in or Sign up to answer