JQL Condition (JSU) not working when checking for linkedIssues and if they have a field set

Boyd K December 1, 2022

Using Atlassian Jira Data Center 9.0.0 in a self-managed/hosted air-gapped environment with Appfire's JSU Automation Suite for Jira Workflows 2.38.0.

I am trying to implement the following requirement: Disallow an issue the "CM Ready" transition (self-reflecting transition, i.e. starting and resulting status is the same) which sets the CM_Ready field (Checkbox) if the current issue has linked issues that are "is child of" the current issue and those linked issues do not have their own CM_Ready field set.  Said differently, don't allow an issue to be marked as CM_Ready if it has issues it depends on that are not all marked as CM_Ready.

So I am trying to use a JQL Condition (JSU) for the "CM Ready" transition to implement this requirement.  Here is the attempted JQL Condition:

JQL Expression: issue in linkedIssues(issue.key, “is parent of”) AND CM_Ready is EMPTY

Number of issues found: Must not find issues.

The syntax of my JQL expression must be incorrect.  The result of this attempted condition was that the "CM Ready" transition is listed EVEN IF the current issue has a linked issue ("is parent of" an issue) whose own CM_Ready field NOT set.

Anyone see the problem with my JQL Expression?

Here is the query I use in a search which successfully returns the expected output:

issue in linkedIssues(BT-1, “is parent of”) AND CM_Ready is EMPTY

where BT-1 "is parent of" BT-2 whose CM_Ready field is NOT set.  Thus, I would expect the JQL Condition would not allow the CM Ready transition for BT-1 but it does allow it.

I am all new to this so I suspect I may be mis-understanding something here.

1 answer

1 accepted

0 votes
Answer accepted
Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

Hello @Boyd K ,

After some (successful) quick tests on my instance and looking at the documentation, have you added brackets to the JQL query in the condition around the issue.key

issue in linkedIssues({issue.key}, “is parent of”) AND CM_Ready is EMPTY

It might just be a detail but an important one.

Boyd K December 5, 2022

I just added the curly brackets, i.e.  {issue.key}, earlier this morning and this resolved the issue.  Thank you.

Like Antoine Berry likes this

Suggest an answer

Log in or Sign up to answer