How to change the status of a subtask created as a part of automation?

Ram March 19, 2023

Hi,

 

  I am creating two sub tasks as a part of automation. I was able to link them together as blocked. However I would also like to change the status of the second sub tasks to Blocked. The status is defined in the workflow. I added a "transition issue" in the automation. Made sure that the "..allow other rule actions..." checkbox is checked as well. However the status of the second sub-task is not changing to "Blocked". Appreciate any help.

Screenshot 2023-03-17 at 6.49.52 PM.png

2 answers

0 votes
Agraj Mangal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2023

Hi @Ram 

There is no way to set issue context on the "Transition issue" so you would probably need to loop over the sub-tasks of the issue created using JQL and then transition each one of them to "blocked" using "Transition Issue" for each of the sub-tasks. Something the below should work

Automation_-_Jira.png

Cheers
Agraj

Ram March 23, 2023

Hi Agraj, 

 

  Thanks for your response. Out of the three subtasks, I would like to move only the issues i.e. sub-tasks 2 and 3 to be in Blocked status not the first one in the chain. Anyhow will try this solution and see if I can come up with a JQL for the two subtasks only and move them to Blocked status.

 

Thanks.

Ram

0 votes
Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2023

To change the status of a subtask created as part of Jira core automation, you can use the "Transition issue" action in the automation rule. Here are the steps to follow:

  1. Go to the Automation section in Jira and select the relevant automation rule that creates the subtasks.
  2. Click on "Add action" and select "Transition issue" from the list of actions.
  3. In the "Transition issue" action, select the second subtask that you want to change the status of from the dropdown menu.
  4. Choose the transition that you want to use to change the status of the subtask. The available transitions depend on the current status of the subtask and the workflow configuration.
  5. If the transition requires any additional fields to be filled out, provide the necessary values. This may include things like comments or resolution.
  6. Save the automation rule.

If the status of the second subtask is not changing to "Blocked" after following the above steps, it may be helpful to check the workflow configuration to ensure that the "Blocked" status is set up correctly. Additionally, make sure that the automation rule is running correctly and that there are no errors or conflicts with other automation rules.

Ram March 20, 2023

Hi Pankaj. Thanks for the response. I followed the exact steps. Please refer to the screenshot in my original question. Also there are no errors reported in the audit log. Audit log says the sub-task status is successfully transitioned. However the sub-task remains in its original status. The workflow doesn't have any restrictions on status changes.

Attaching the audit log and the end result to this response. Screenshot 2023-03-20 at 12.53.39 PM.pngScreenshot 2023-03-20 at 12.53.13 PM.png

Marco Hochstein
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 1, 2023

Hi Ram,

 

I'm having kind of a similar problem. You don't see an error but also not the correct behavior because the automation does not change the status of your sub task but looks at the issue that triggered the automation. So you are probably changing the status of the parent to "blocked". 

In my case an update to an asset triggers my automation. I create an issue with a sub task and want to update the status. I managed to address the parent issue by branching to "most recent created issue" but that seems not to work for sub-tasks. 

 

I'm a bit stuck too.

Marie-Claude Landry December 5, 2023

I used this to set the status of the last sub-task to Ready for Dev. You can create a branch for each sub-task and follow the same logic. Good luck!

Sub-Task - Ready for Dev Status.png

Suggest an answer

Log in or Sign up to answer