Some Jira sub-tasks are archived without their parent issue being archived

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The purpose of this article is to describe a situation where a Jira sub-task is archived while its parent issue is still active and how to get out of it, since this situation is known to cause the following issues:

  • the inability to un-archive the sub-task (it is not possible to restore a sub-task without restoring its parent issue, and the parent issue needs to be in the archived state as well)

  • the inability to move a parent issue (such as a Story, Task, Bug...), since it contains archived sub-tasks that can't be restored. More information about this issue in this other KB article

(Auto-migrated image: description temporarily unavailable)

Environment

Jira Data Center on any version from 8.20.0.

Diagnosis

  • The parent issue of the sub-task is still active (=non archived)

    (Auto-migrated image: description temporarily unavailable)
  • Checking the history tab of the archived sub-task, you might notice that a Jira user used to run scripts and automations is the one that archived it:

    (Auto-migrated image: description temporarily unavailable)
  • The 3rd party add-on ScriptRunner For Jira is installed, and when going to the page ⚙ > ScriptRunner > Jobs, we can see that there is a job configured to use the method Issue Archiving Job to periodically archived Jira issues (including sub-tasks):

    (Auto-migrated image: description temporarily unavailable)

Cause

By design, it is not possible to archive a Jira sub-task individually without archiving its parent issue:

  • as explained in the documentation archiving an issue, archiving a parent issue (such as a Story, Task, Bug...) will automatically archive all its subtasks

  • there is an open feature request tracked in https://jira.atlassian.com/browse/JRASERVER-70638 which is meant to add the ability to archive a subtask without archiving its parent issue

Even though Jira does not natively allow the archiving of subtasks without archiving their parent issue, some 3rd party add-ons might "violate" this Jira restriction and allow users to archive sub-tasks. For example, the Issue Archiving Job (Data Center) that comes from the ScriptRunner For Jira add-on can be configured to archive sub-tasks, which brings them in an inconsistent state (since it is normally not possible to archive sub-tasks in a fresh vanilla instance). 

Solution

Solution to unarchive the archived sub-tasks

By design, it is not possible to restore a sub-task on its own. For this reason, you will need to follow the steps below:

  • Open the parent issue of the archived task

  • Archive the parent issue via the menu More > Archive

    (Auto-migrated image: description temporarily unavailable)
  • Restore the parent issue via the Restore button

    (Auto-migrated image: description temporarily unavailable)

After the parent issue is restored, all its sub-tasks will be automatically restored.

Solution to prevent the situation from happening in the future

Modify the JQL Query parameter of the issue archiving job to exclude sub-tasks by adding at the end of the JQL query the condition below:

1 issuetype not in (Sub-task)

Updated on March 17, 2025

Still need help?

The Atlassian Community is here for you.