Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×

Forums

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

Sprint Automation trigger for Sub Tasks

JasonB3 August 17, 2020

This is probably real simple and I'm just missing the plot, but I can't seem to get the Jira Automation trigger: Sprint Start or Sprint Complete to execute against sub tasks. 

Does anyone have a way?

My JQL keeps coming up with only issue level not sub tasks. Even though the sub tasks have a sprint assignment and status is not equal to Done

Untitled.png

 

I've tried this JQL too, and no go. I just get an invalid JQL response. Not sure where the error is or how to test a JQL with smart values. 

sprint = {{sprint.name}} AND status != "Done" AND issuetype in subTaskIssueTypes()

My Sprint Complete code is similar. Only difference is that it's trying to unassign subtasks. 

 

This is on a Next Gen project. 

 

Any suggestions?

2 answers

1 accepted

0 votes
Answer accepted
JasonB3 September 17, 2020

I found a workaround!

 

  1. Add a new field to Issues that receive subtasks (for me; bugs, stories, and tasks). This field will be used to detect changes later. I called mine AutoAssign and made it an integer field type.
  2. Create a new rule. I called mine: [AUTO_ASSIGN] Assigns Sub-Tasks
    1. trigger = Field Value Changed, Field monitors changes to the AutoAssign for any edit of issue.
    2. build your logic to perform work on subtasks as needed. I made mine as:
      AutoAssign=1, then Assigns Sub-Tasks same as Parent
      AutoAssign=0, then Unassigns Sub-Tasks
    3. lastly on Rule Details, make sure you check the box Allow Rule Trigger
      Untitled.png
  3. Create another rule. This one I called: [SPRINT=COMPLETE] Un-assign Sub-Tasks
    1. trigger = sprint complete
    2. logic starts with JQL branch with logic like:
      project = "YourProjectNameHere" AND sprint = {{sprint.id}} AND status != "Done"
    3. and edits all issues AutoAssign to equal zero.  
  4. Finally, create one more rule for Sprint Start. The logic is the same as the sprint complete, just toggling the AutoAssign to equal one instead.

 

To my surprise this actually worked. Seems ridiculous, but at least I'm not blocked or doing a bunch of manual assigning. 

0 votes
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2020

Hi @JasonB3 

Making a minor modification in the JQL should make this work

This is how I achieved this rule:

  1. Trigger: Sprint Started in <<Board Here>>
  2. Branch: JQL - JQL: sprint = {{sprint.id}} and status != Done
  3. Condition: Issue Type (field) equals (condition) Subtask (Value)
  4. Action: Assign Issue - specify user = Copy from Parent

^ {{sprint.id}} is the unique identifier, as opposed to {{sprint.name}} which can be a variable.

Ste

JasonB3 August 30, 2020

Hi @Ste Wright 

 

Nope that didn't work. Automation logs show that the JQL only returned Issues and No Subtasks.

Interestingly, I was trying to troubleshoot this and came across something similar with JQL and not using smart tags. See Sprint Query to find Subtasks Not working 

 

Could it be possible that the issue isn't with smart tags or automation, but the JOIN between status and sprint?

 

PS, sorry for the late reply. Had to wait for a sprint cycle to complete to test. 

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2020

Hi @JasonB3 

It should work - I have this built in a Next-Gen project in our environment; it's how I tested the above!

I just re-ran the rule and it works on our instance - albeit 1 of the 4 sub-tasks didn't get located by the rule. I've not been able to work out why.

Is it still not working for you? I would advise creating a new Next-Gen project to allow you to start/stop sprints repeatedly when trying to replicate the rule :)

Ste

JasonB3 September 17, 2020

nope. that didn't work either... but I found a solution

Suggest an answer

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

Atlassian Community Events