Is it possible to set a validator or a condition so that the task cannot be closed until all subtasks are closed.
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:
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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... 😄
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.