Preventing closing a JIRA task if it has open sub-tasks

Many of our JIRA tasks, have sub-tasks that describe the various tasks that are required to complete the main task. The team member works on each sub-task until she completes all of them. Once completed, she will close the main task.

Sometimes, mostly on busy periods, my team members forget to look at status of sub-tasks, and close the main task, since by default, JIRA allows closing the main task even if not all of its sub-tasks are closed.

In order to prevent this, we can add a condition to the workflow to allow resolving or closing a task only when all of the children sub-tasks are in closed state. You can do this by following these simple steps:

1. Log in to JIRA’s administration screen.

2. Go to the Workflows screen.

3. Select the workflow that you would like to add this condition.

4. Edit the workflow (I usually prefer to edit in text mode)

5. Edit all workflow transitions that leads to the Close status and add the condition: “All sub-tasks must have  one of the following statuses to allow parent issue transition” and select “Closed” as the allowed transitions.

6. Publish the updated workflow.

 

Below is a screenshot how it should look in JIRA (click to enlarge):

Example configuration for preventing users to close a task in JIRA in case not all of they sub-tasks are closed.

Example configuration for preventing users to close a task in JIRA in case not all of they sub-tasks are closed.

 

One thought on “Preventing closing a JIRA task if it has open sub-tasks

  1. aïe

    Thank you for sharing your info. I really appreciate your efforts and
    I am waiting for your next post thank you once again.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *