Jira Datacenter supports archiving of issues and projects since v8.1. By archiving issues, Jira will remove them from the indexes. The archived issues will still be accessible in read-only mode, however, they will not appear in search results. This enhances Jira performance because it stores less data in the indexes.
As many of the Xray entities are normal Jira issue objects, archiving its issues has the same effect of archiving any other Jira issue type. But additionally, Xray extends this feature by archiving some of its internal data.
The goal of this page is to describe the effects of archiving issues on Xray.
Archiving old Test Executions is a good use case for archiving Xray issues, especially if continuous integration processes are used. These can quickly create many Test Execution issues while importing new execution results into Xray on a daily basis. These issues are good candidates to be archived. |
Archiving Test Execution issues will hide them from:
Archiving Test Executions will also archive its Test Runs.
Archiving a Test Execution issue automatically archives its related Test Runs. Doing so will not delete the Test Run information from database, instead they will be:
A message will be shown in the Test and Test Execution issue view informing there are archived Test Runs:
And also in the execution page:
Test Runs archived via Test Execution issue can be restored at any time by restoring the Test Execution issue.
Archived Test issues:
Archiving Tests will also archive its Test Runs.
Archiving a Test issue also automatically archives its related Test Runs with the same effects described when archiving via Test Execution issue.
Test Runs archived via Test issue can be restored at any time by restoring the Test issue.
Archiving Test Plans will hide them from:
Archived Test Plans will also no longer be used as scope for the Test Run Status and Requirement Status.
Archived Test Plans are no longed used as scope for the Test and Requirements status custom fields, which affects the scope analysis of Requirements and Tests: After archiving a Test Plan TP, a given requirement R that was NOK in the scope of TP will be UNCOVERED for the same scope TP.
Another effect of not being used as scope is that the Latest Statuses of Tests under a Test Plan issue will not be shown anymore. For this reason, when archiving a Test Plan, a message will be displayed informing of the situation:
An archived Test Plan issue can be restored anytime, doing so will retrieve the Test Plan state prior to archiving and all of the Test Plan-scoped statuses for Tests and Requirements.
Archived requirements will be excluded from:
Archiving requirements will also archive their Sub-Test Executions.
Each issue is archived along with all its subtasks.
In case a Requirement is archived, its Sub-Test Executions will be archived as well. A Sub-Test Execution has the same functionalities of a Test Execution so archiving them have the same effect as archiving a Test Execution issue, namely all its Test Runs will be archived.
Archived Test Sets and Pre-Conditions will be excluded from:
When archiving a Project all its issues are archived as well, including the Xray ones.
The effects of project archiving on Jira and Xray will be the same as archiving issues. For example, the archived issues will no longer be present on JQL results and if Test or Test Executions are found, Xray will also archive their internal data, namely its Test Runs.
The latter can be a long running task depending on the amount of Xray data to handle, but currently there is no easy way of knowing the progress of it.
In case you need to know the overall progress of the project archive, you can refer to the below queries which will report the number of active/archived entities.
On Project archive:
--The below query returns the number of non-archived test runs in the project. Once it reaches 0, all test runs where successfully archived. Replace <PROJ_KEY> with the project key. SELECT count(*) as active_test_runs FROM "AO_8B1069_TEST_RUN" tr JOIN jiraissue exec_issue on exec_issue.id=tr."TEST_EXEC_ISSUE" JOIN project p1 on p1.id=exec_issue.project JOIN jiraissue test_issue on test_issue.id=tr."TEST_ISSUE_ID" JOIN project p2 on p2.id=test_issue.project WHERE (tr."ARCHIVED" = 'N' or tr."ARCHIVED" IS NULL) AND (p1.pkey = '<PROJ_KEY>' OR p2.pkey = '<PROJ_KEY>') --The below query returns the number of active tests in test repositories and test plan boards. Once it reaches 0, all tests where successfully hidden. Replace <PROJ_KEY> with the project key. SELECT count(*) as active_tests FROM "AO_8B1069_LEAF" leaf JOIN jiraissue test on test.id=leaf."TEST_ID" JOIN project p1 on p1.id=test.project WHERE (leaf."ARCHIVED" = 'N' or leaf."ARCHIVED" IS NULL) AND (p1.pkey = '<PROJ_KEY>') |
-- The below query returns the number of non-archived test runs in the project. Once it reaches 0, all test runs where successfully archived. Replace <PROJ_KEY> with the project key. SELECT count(*) as active_test_runs FROM AO_8B1069_TEST_RUN tr JOIN jiraissue exec_issue on exec_issue.id=tr.TEST_EXEC_ISSUE JOIN project p1 on p1.id=exec_issue.project JOIN jiraissue test_issue on test_issue.id=tr.TEST_ISSUE_ID JOIN project p2 on p2.id=test_issue.project WHERE (tr.ARCHIVED = 'N' or tr.ARCHIVED IS NULL) AND (p1.pkey = '<PROJ_KEY>' OR p2.pkey = '<PROJ_KEY>') -- The below query returns the number of active tests in test repositories and test plan boards. Once it reaches 0, all tests where successfully hidden. Replace <PROJ_KEY> with the project key. SELECT count(*) as active_tests FROM AO_8B1069_LEAF leaf JOIN jiraissue test on test.id=leaf.TEST_ID JOIN project p1 on p1.id=test.project WHERE (leaf.ARCHIVED = 'N' or leaf.ARCHIVED IS NULL) AND (p1.pkey = '<PROJ_KEY>') |
On Project restore:
--The below query returns the number of archived test runs in the project. Once it reaches 0, all test runs where successfully restored. Replace <PROJ_KEY> with the project key. SELECT count(*) as archived_test_runs FROM "AO_8B1069_TEST_RUN" tr JOIN jiraissue exec_issue on exec_issue.id=tr."TEST_EXEC_ISSUE" JOIN project p1 on p1.id=exec_issue.project JOIN jiraissue test_issue on test_issue.id=tr."TEST_ISSUE_ID" JOIN project p2 on p2.id=test_issue.project WHERE tr."ARCHIVED" = 'Y' AND (p1.pkey = '<PROJ_KEY>' OR p2.pkey = '<PROJ_KEY>') --The below query returns the number of archived tests in test repositories and test plan boards. Once it reaches 0, all tests where successfully restored. Replace <PROJ_KEY> with the project key. SELECT count(*) as archived_tests FROM "AO_8B1069_LEAF" leaf JOIN jiraissue test on test.id=leaf."TEST_ID" JOIN project p1 on p1.id=test.project WHERE (leaf."ARCHIVED" = 'Y') AND (p1.pkey = '<PROJ_KEY>') |
-- The below query returns the number of archived test runs in the project. Once it reaches 0, all test runs where successfully restored. Replace <PROJ_KEY> with the project key. SELECT count(*) as archived_test_runs FROM AO_8B1069_TEST_RUN tr JOIN jiraissue exec_issue on exec_issue.id=tr.TEST_EXEC_ISSUE JOIN project p1 on p1.id=exec_issue.project JOIN jiraissue test_issue on test_issue.id=tr.TEST_ISSUE_ID JOIN project p2 on p2.id=test_issue.project WHERE tr.ARCHIVED = 'Y' AND (p1.pkey = '<PROJ_KEY>' OR p2.pkey = '<PROJ_KEY>') -- The below query returns the number of archived tests in test repositories and test plan boards. Once it reaches 0, all tests where successfully restored. Replace <PROJ_KEY> with the project key. SELECT count(*) as archived_tests FROM AO_8B1069_LEAF leaf JOIN jiraissue test on test.id=leaf.TEST_ID JOIN project p1 on p1.id=test.project WHERE (leaf.ARCHIVED = 'Y') AND (p1.pkey = '<PROJ_KEY>') |
This section refers to the Xray custom issue links only (Tests with Pre-Conditions, with Test Sets, etc.) and not to the Jira native issue link feature. |
Archiving issues do not archive the associations between Xray issues: for instance an active Test issue is still associated with an archived Test Set issue.
However, due to the fact that archived issues are no longer present on Lucene indexes and some Xray Issue Data Table components used to display information about the issue links are built on top of JQL searches, these will no longer show the archived associated issues.
Whenever that happens, a warning message will be displayed informing that some associated issues are being hidden from the UI.