Forums

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

Looking for a Jira expressions to check the Workflow condition

Admin IT
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!
August 20, 2023

Looking for an Jira expression to check the workflow condition that, if X sub-task issue type is there then once this sub-task is closed then only Parent issue should be closed till that time parent issue should not be able close.

2 answers

2 votes
Trudy Claspill
Community Champion
August 20, 2023

Hello @Admin IT 

Welcome to the Atlassian community.

Are you working with issues in a Team Managed project or a Company Managed project? That information will show at the bottom of the panel on the left when you are viewing the project, or you can see it in the Type column on the "View all projects" screen.

For Company Managed projects Jira has a native workflow condition for that. It is called "Sub-Task Blocking Condition".

https://support.atlassian.com/jira-cloud-administration/docs/configure-advanced-issue-workflows/#Conditions

There is not a comparable Rule that can be used in the workflow of a Team Managed project. In that case you would need to set up a custom field to keep track of whether or not the issue had open subtasks. You could use an Automation Rule to update that field. Then in the workflow you could use the "Restrict to when a field has a specific value" rule to block transition of the issue if the custom field did not indicate it has no open subtasks.

Admin IT
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!
August 20, 2023

Hi @Trudy Claspill ,

Thank you for the information.

It's a company managed project. In my project I have two sub-tasks lets say X sub-task and Y sub-task. These two sub-tasks may have for one parent issue.

My condition needs to check only for X sub-task and X sub-task should be Done status then only parent issue should be allowd to close. And in all other cases it should through an error saying that to close parent you must close X sub-task first.

Thank you.

Trudy Claspill
Community Champion
August 21, 2023

There is not a native Workflow Transition Validator function for what you want to do. 

You could use the second option I mentioned, using a custom field in the parent issue to keep track of whether or not the specified subtask has closed and use automation to update that field.

Then for both Company Managed and Team Managed projects you have the option in the workflow to set a Validator or Rule to check that a specified field has a specified value. You could check the custom field to confirm it has the value indicating the subtask has been closed. 

Suggest an answer

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

Atlassian Community Events