Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When archiving a Project all its issues are archived as well, this includes including the Xray issuesones.

The effects of project archiving on Jira and Xray will be the same as archiving issues. If 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  This can be a long running task depending on the amount of Xray internal data to handle. Currently, Jira provides no , but currently there is no easy way of knowing the progress of a project archival blablablablabla TODOit.

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:

Code Block
languagesql
titlePostgreSQL
collapsetrue
--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>')

Code Block
languagesql
titleMySQL
collapsetrue
-- The below query returns the number of non-archived test runs in the project. Once it reaches 0, all test runs where successfully restoredarchived. Replace <PROJ_KEY> with the project key.
SELECT count(*) as archivedactive_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' N' or tr.ARCHIVED IS NULL)
AND (p1.pkey = '<PROJ_KEY>' OR p2.pkey = '<PROJ_KEY>')
 
-- The below query returns the number of archivedactive tests in test repositories and test plan boards. Once it reaches 0, all tests where successfully restoredhidden. Replace <PROJ_KEY> with the project key.
SELECT count(*) as archivedactive_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'N' or leaf.ARCHIVED IS NULL)
AND (p1.pkey = '<PROJ_KEY>')

On Project restore:

Code Block
languagesql
titleMySQLPostgreSQL
collapsetrue
-- The below query returns the number of non-archived test runs in the project. Once it reaches 0, all test runs where successfully archivedrestored. Replace <PROJ_KEY> with the project key.
SELECT count(*) as activearchived_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)Y' 
AND (p1.pkey = '<PROJ_KEY>' OR p2.pkey = '<PROJ_KEY>')
 
-- The below query returns the number of activearchived tests in test repositories and test plan boards. Once it reaches 0, all tests where successfully hiddenrestored. Replace <PROJ_KEY> with the project key.
SELECT count(*) as activearchived_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 NULLY')
AND (p1.pkey = '<PROJ_KEY>')
Code Block
languagesql
titleMySQL
collapsetrue

 
-- 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>')

...