Forums

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

subtasks are closed

Ivan Andrieiev
Contributor
November 22, 2022

Is it possible to set a validator or a condition so that the task cannot be closed until all subtasks are closed.

3 answers

1 vote
Hamza Chundrigar
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.
November 22, 2022

Hi @Ivan Andrieiev 

There isn’t a OOTB Workflow Validator that I’m aware of but there is a condition called Sub-Task Blocking Condition. This type of condition can prevent a parent issue from being resolved until all of its sub-tasks are resolved


You could specify that the parent issue should only be closed if all the subtasks are done. In your workflow, select the transition:

  • Go to the "Conditions" tab and Add Condition.
    Add the standard Jira condition called "Sub-Task Blocking Condition".
  • Specify the status in which the subtask should be in order for the done transition to be allowed on the task. Check "done" status.
  • Press Add.

 

That’s one way to approach it. We use JMWE’s Linked Issue(s) Status Validator which ensures that the current issue's linked issues (existing and ones added during the transition) respect the specified condition against selected statuses.

 

Best regards,

Hamza

1 vote
Vedant Kulkarni_Trundl
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.
November 22, 2022

@Ivan Andrieiev 

if you have Scriptrunner installed on your system, then you can use the below expression in the Task workflow

issue.subtasks.filter(subtask => subtask.status.name == 'Done').length == issue.subtasks.length

0 votes
Max Foerster - K15t
Community Champion
November 22, 2022

Hi @Ivan Andrieiev ,

Yes, it is possible. You have to use Jira Expressions for that validator. You can find an example implementation in this use case for a marketplace app:

You can also use the expression without any marketplace app, as they all use the Jira Expression functionality in Jira.

Best, Max

Edit: time for a correction from my side. I forgot that there's no out-of-the-box functionality. So you should have a look into workflow extension for Jira Cloud. But then, all of them will use Jira Expressions as afaik that's the only possible way to implement more sophisticated logic in Jira Cloud... 😄

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events