Can archived issues be un-archived through the database with a query?
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
Jira has a feature that allows you to archive issues and projects when they are no longer actively in use but you still want to have a record of them. Archiving means that the issues will can still be accessed directly but will no longer be editable, not linked to and will no longer be part of the search index, i.e you can't find them in searches as well as not appearing in functionality that relies on search, such as boards, dashboards, etc. The benefit is that you un-burden the search index, which helps with search performance, and keeps the instance from being cluttered with out-of-date information. You can read more about the archiving feature on the Archiving a project and Archiving an issue documentation pages.
Sometimes you would want to un-archive issues or project again, which can be done via the UI (also described on the Archiving a project and Archiving an issue pages under "Restore"). This process can take some time depending on the number of issues and relations involved.
Environment
Jira Data Center 7.10 or newer
Solution
Can't I just change the archived status in the database real quick?
After all, the jiraissue
table has an archived
column. Can't I just change that value?
The short answer is: No.
It's understandable to seek a faster un-archiving operation, but un-archiving issues via the database directly will actually be a lot more time consuming than using the UI. Not only that, it would also be a very risky operation as any errors could result in an inconsistent Jira database that can be very hard to fix.
The reason for both is that there is a number of steps that need to be taken for an issue to become un-archived and searchable again:
1. Assess the access control and permissions for the issues and restoring them according to your permission schemas.
2. Perform data integrity checks
3. Ensuring issue links and other dependencies such as custom fields, workflows or other related configurations that may have changed since the archiving took place. Jira tries to reconcile these differences, if any.
4. Update the database to unflag the issue (and project) as active
5. Perform a re-indexing of the restored issues or projects
6. Handle any event triggers happening as a result of these issues becoming active again
7. Handle any notification triggers that can be the result of reactivating the issues
As you can see there are multiple, necessary, steps involved and performing this in the database directly would be a very complex operation.
Doing all of this manually will take significantly longer than the process of unarchiving via the UI and Jira will also need to be stopped for the duration of this. Also, if some step is handled incorrectly there is a risk of introducing breaking inconsistencies in the Jira database. Fixing this would be a very complex and time consuming. Often a database restore from backup is the only available option.
For these reasons, un-archiving should only ever be done using the UI.
If the un-archiving in the UI fails for some reason, please contact Atlassian Support.
Was this helpful?