Deletion and restoration of test artifacts

When you delete an artifact, it is moved to the Trash view, but it is not permanently deleted from the database. From the Trash view, you can restore the artifacts or permanently delete the artifacts from the database.
Attention: Artifacts that are permanently deleted cannot be recovered. In some cases, you cannot restore artifacts that are moved to the Trash view, even if you do not permanently delete them. Before you delete an artifact, make sure that you understand the consequences of moving artifacts to the Trash view. For more information, see Table 1.

Required permissions to delete and restore artifacts

As a safeguard against accidental deletions, only users who have the Permanently Delete permission can permanently delete artifacts. To delete artifacts that have reviews or approvals, you must also have the Delete Work Item permission. Both permissions are disabled by default. If you have the permissions to delete test artifacts, you can delete them by showing the artifacts in a list view and then selecting from the action menu. To delete artifacts that cannot be shown in a list view, such as categories and custom attributes, use the artifact editor.

When you permanently delete an artifact, its related work items are not deleted. If an artifact supports reviews, you also need the Delete Work Item permission because those test artifacts can include references to work items from the formal review process. Those work items are used by the test artifacts only and are not shown in reports, queries, dashboards, external links, and editors. To permanently delete artifacts that support formal reviews, you need the Delete Work Item permission.

To restore artifacts, you must have the Restore permission. For more information about required permissions, see the related help topic about Quality Management role-based permissions.

The Trash view

You can access the Trash view from the Admin menu. After you are in the Trash view, you can select the type of artifact that you want to view from the View list.

In the Trash view, you can restore or permanently delete artifacts. To restore an artifact, select the artifact, and from the action menu, click Restore Artifact (Restore Artifact).

You can view which artifacts were permanently deleted by selecting Audit from the View As list. Attachments are not in the list of permanently deleted artifacts. To permanently delete an artifact in the Trash view, from the View As list, select Trash, and then select the artifact. From that artifact’s action menu, click Permanently Delete.

If the artifact that you selected contains attachments, you can also permanently delete them from the database. If you delete attachments, they are removed from the system. However, other test artifacts that included those attachments might still contain references to the attachments. Artifacts that link to a deleted attachment include a link to a new attachment, named Deleted.txt. That .txt file contains one word: Deleted.

Usually, deleted artifacts are not shown in search views. However, you might still find links to deleted artifacts from artifacts that are not deleted.

Deletion information by artifact type

Because test artifacts often depend on each other, the deletion or restoration of one artifact can affect several other artifacts. In general, when an artifact is deleted or restored, its linked artifacts remain unchanged. For example, if you delete a test case, its test scripts are not deleted. Artifacts that link to the deleted artifact no longer show the link. For example, if a test case is deleted, a test plan that links to that test case no longer shows the link to the test case. For exceptions to this behavior, see the following table.

Table 1. Important information about deleting artifacts
Artifact type Notes about deletion (moving artifacts to the Trash view) Notes about restoration Notes about permanent deletion
Test plan  

To permanently delete the test plan, you need the Delete Work Item permission.

You can permanently delete all test plan attachments.

When you permanently delete a test plan, all snapshots of the test plan are also permanently deleted.

Test case All of the associated test case execution records and test case results are moved to the Trash view. All of the associated test case execution records and test case results are also restored.

To permanently delete the test case, you need the Delete Work Item permission.

You can permanently delete all test case attachments.

When you permanently delete a test case, all snapshots of the test case are also permanently deleted.

If you permanently delete a test case, you cannot restore the associated execution records and results.

Test script    

To permanently delete the test script, you need the Delete Work Item permission.

You can permanently delete all test script attachments.

When you permanently delete a test script, all snapshots of the test script are also permanently deleted.

Test suite All of the associated test suite execution records and test suite results are moved to the Trash view. All of the associated test suite execution records and test suite results are also restored.

To permanently delete the test suite, you need the Delete Work Item permission.

You can permanently delete all test suite attachments.

When you permanently delete a test suite, all snapshots of the test suite are also permanently deleted.

If you permanently delete a test suite, you cannot restore the associated execution records and results.

Test data    

You can permanently delete all test data attachments.

When you permanently delete test data, all snapshots of the test data are also permanently deleted.

Keywords    

You can permanently delete all keyword attachments.

When you permanently delete a keyword, all snapshots of the keyword are also permanently deleted.

Test case execution record All of the associated test case results are moved to the Trash view.

All of the associated test case results are also restored.

If the test case that is associated with the test case execution record is deleted, restore the test case. Then, the associated test case execution records are also restored.

If the test case that is associated with the test case execution record is permanently deleted, you cannot restore the test case execution record.

To permanently delete the test case execution record, you need the Delete Work Item permission.

You can permanently delete all test case execution record attachments.

If you permanently delete a test case execution record, you cannot restore the associated results.

Test case result

Active test runs that are associated with the deleted test case result are canceled.

Active test suite runs that are associated with the deleted test case result are canceled.

If the test case execution record that is associated with the test case result is deleted, restore the test case execution record. Then, the associated test case results are also restored.

If the test case execution record that is associated with the test case result is permanently deleted, you cannot restore the test case result.

You can permanently delete all test case result attachments.

Test suite execution record All of the associated test suite results are moved to the Trash view.

All of the associated test suite results are also restored.

If the test suite that is associated with the test suite execution record is deleted, restore the test suite. Then, the associated test suite execution records are also restored.

If the test suite that is associated with the test suite execution record is permanently deleted, you cannot restore the test suite execution record.

To permanently delete the test suite execution record, you need the Delete Work Item permission.

You can permanently delete all test suite execution record attachments.

If you permanently delete a test suite execution record, you cannot restore the associated results.

Test suite result  

If the test suite execution record that is associated with the test suite result is deleted, restore the test suite execution record. Then, the associated test suite results are also restored.

If the test suite execution record that is associated with the test suite result is permanently deleted, you cannot restore the test suite result.

You can permanently delete all test suite result attachments.

Test environment      
Attachments     If multiple test artifacts link to a deleted attachment, those artifacts include a link to a new attachment, named Deleted.txt. That file contains one word: Deleted.
Template You cannot delete templates that are set as default.   Artifacts that were created by using a deleted template remain unchanged.
Template section    

Artifacts that use the deleted template section are not changed.

Multiple templates might use the same template section. If you delete a template section from one template, it is also removed from all other templates that use the section.

Category Category values are also moved to the Trash view. Associated category values are also restored.

To permanently delete a category, you must have the Permanently Delete permission for categories and category values.

If you permanently delete a category, all category values are also permanently deleted.

The category and its values are removed from all artifacts.

Category value  

If the category that is associated with the category value is deleted, restore the category. Then, the associated category values are also restored.

If the category that is associated with the category value is permanently deleted, you cannot restore the category value.

The category value is removed from all artifacts.
Custom attribute     The custom attribute is removed from all of the artifacts.
Channel      
Build definitions and build records

If you delete a build definition or build record that is a synchronized copy of an artifact from an external build tool, the original build definition or build record is not deleted from the external build tool. If you do not also delete the build definition or build record from the external tool, the build definition or build record is added back to Rational Quality Manager during the next synchronization. You should delete the build definition or build record from the external tool before you delete it from Rational® Quality Manager.

You can delete build records from a build definition that was created in Rational Quality Manager or that was created by using the REST API. However, you cannot delete build records from a synchronized copy of a build definition.

When you delete a build record, its build definition is updated.

   


Have a problem or a question? Post it in the Jazz.net forum.