Forums

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

JQL to find several undefined subtasks which are unresolved

Malene Vikkelsø
Contributor
July 18, 2024

I am trying to build a (or more) Automation Rule(s), that will transition my User Story through its workflow based on the statuses of its subtasks.

I have a User Story template that when creating the User Story 7 subtasks will automatically be created as well, therefore these subtasks will all have a specific naming standard.

I use a Related issue condition, with Sub-tasks All match specified JQL, to determine whether the User Story are allowed to transition, e.g. it is only when three specific subtasks are marked Done that the User Story are allowed to be transitioned.

I have succeed in making an automation rule that will transition the User Story when specific Subtasks are Completed, so my goal is completed.

A snippet of my Rule

Skærmbillede 2024-07-18 kl. 10.33.35.png

 

My issue that the Team might create extra subtasks which will break my automation rule since the All match specified JQL condition no longer is met, due to the new/extra subtask not being mentioned in the JQL

My question therefore is, is it possible to create a JQL where a specific subtask is in a specific status and the rest of the subtasks must have unresolved resolution, e.g. ((summary ~ "Frontend" AND status = Done) AND ("the rest of the issues" AND resolution = Unresolved))

2 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 18, 2024

Hi @Malene Vikkelsø 

As your rule is triggered from the subtask, you could ignore the specifics of the pre-defined subtasks and instead find all sibling subtasks which have the same parent:

project = yourProjectName 
AND issueType = Sub-task
AND parent = {{triggerIssue.parent.key}}

That could be used with a related issues condition, or the lookup issues action when more complicated checks / processing is needed.

Kind regards,
Bill

Malene Vikkelsø
Contributor
July 18, 2024

I will definitely give this a try. Thank you for the suggestion.

Malene Vikkelsø
Contributor
August 6, 2024

Just a follow up, I re-designed my automation rule and made use of the lookup action and create variable to get the desired outcome. Thank you for pointing me in the right direction.

Instead of using related issues conditions with subtasks and JQL match, I created a custom field to keep track of the subtasks and which phase they belonged to in the user story workflow.

I then used the lookup and variable in my automation rule and keep track of my subtasks in the specific phase and match that number with number of Done-subtasks in that phase, if those two numbers matched, then the User Story is allowed to transition.

I then created automation rules for each phase instead of one big rule for easier maintenance and transparency.

Like Bill Sheboy likes this
0 votes
Malene Vikkelsø
Contributor
July 18, 2024

I just thought I had the solution, sadly I didn't. And I am unable to delete a comment, I can only edit it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events