Forums

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

How to block the transition of a sub-task based on the status of its parent task?

Merle Heidel August 2, 2023

Hi everyone. 

I would like to block/prevent the transition of a subtask from "to do" to "in progress" when the parent task is not yet to be worked on.

That means if I want to move the subtask into "in progress" it should not work if the parent task has the status "draft" or "ready to be refined".
I have already worked with conditions like "Linked Issues Status Condition", but it did not work.

kind regards

1 answer

1 accepted

3 votes
Answer accepted
Jack Brickey
Community Champion
August 2, 2023

Hi @Merle Heidel , you would need an addon app to achieve the "blocking" requirement. A common app for this is Scriptrunner and maybe you have it already? With that said, one potential workaround, would be to use automation, and reset the status back to "to do" if the parent status should prevent the transition. Not ideal, but it is a workaround and you can add a comment back to the user that triggered the event to remind them of the requirement.

Merle Heidel August 2, 2023

Hi @Jack Brickey thank you for the quick reply. That makes sense! I think we have the Jira Misc Workflow Extensions (JMWE) where you can write a script. But I am not familiar with the syntax. Do you have a suggestion for a script?

Jack Brickey
Community Champion
August 2, 2023

Hi @Merle Heidel , I cannot immediately help you with the JMWE script. You could search the community to see if there's something out there on this. However, one possible work around just occurred to me. Assuming that the issue you were having with subtasks transitioning prematurely is human error and not violation then you could consider creating a custom field used in the sub-tasks and set/Cleared via the parent transition. Let me explain further.

  • Add a custom field, let's call it "Cleared for takeoff" with values of yes and no. Set the default to no. Apply this custom field to the subtask issuetype.
  • Create an automation rule that will set this new custom field on any sub task associated with a parent issue transitioning to appropriate status(es).
  • On the workflow for the subtask issue type add a condition that requires the custom field to be "Yes".

Let me know if this makes sense or not.

Merle Heidel August 3, 2023

Hi @Jack Brickey Yes, that works. Amazing. Thank you so much! It takes like a second for Jira to switch the values of that custom field and for the condition to kick in. But that is totally fine. :) 

Jack Brickey
Community Champion
August 3, 2023

Cool! 

Suggest an answer

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

Atlassian Community Events