Deleting and restoring test artifacts

When you delete a test artifact, it is moved to the Trash page, but it is not permanently deleted from the database. From the Trash page, you can restore the artifacts or permanently delete the artifacts from the database.

Attention: Artifacts that are permanently deleted cannot be recovered, 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. For information on role-based permissions for each operation, see Quality Management role-based permissions.

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. Those work items are used by the test artifacts only and are not shown in reports, queries, dashboards, external links, and editors.

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.

Restoring and permanently deleting on the Trash page

You can access the Trash page from the Administration menu. In that view, you can select the type of artifact to view from the View list, and then restore or permanently delete artifacts.

To restore an artifact, select the artifact, and from the action menu, click Restore Artifact Restore Artifact.

To view permanently deleted artifacts, select Audit from the View As list. Attachments are not in the list of permanently deleted artifacts. To permanently delete an artifact on the Trash page, from the View As list, select Trash, and then select the artifact. From that artifact’s action menu, click Delete Artifact Permanently Delete.

Deleting attachments

Attachments are stored in the database independently of the artifacts that reference them. The attachments remain in the database until they are permanently deleted. You can permanently delete attachments, however a best practice would be to first permanently delete the artifact that it is attached to. As you delete the artifact, a window opens from which you can permanently delete attachments.

If you have the Administrator role and have enabled asynchronous migration, you can use the Manage Artifact Attachments option on the Administration menu. The list view on the page shows the attachments in the project area, such as attachments added to artifacts, images added to the rich-text editor, and data files associated with test data. You can delete the attachments if you have the permission assigned. Deleted attachments are not included in the artifact editors, but are still functional for test data and displayed in the rich-text editor. You can restore deleted attachments from the Trash view or permanently delete them if you have the permission assigned. The rich-text editor displays a file-not-found link for the permanently deleted attachment. Test data with an associated data file that is permanently deleted is not functional. Test executions using the test data will fail.

Test artifacts that included permanently deleted attachments might still contain references to those 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 results. However, you might still find links to deleted artifacts from artifacts that are not deleted.

Deleting review-enabled artifacts

You can permanently delete any artifact that has been assigned for formal review. When you delete the review-enabled artifact, all of the associated approval groups are deleted from the repository and any sensitive data in them is also no longer accessible.

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.
Note: Every test artifact has separate permissions for the delete, restore, or permanently delete action that each role can perform. You can view the list of available permissions from the Manage Project Properties page under the Administration menu.
Artifact type Notes about deletion (moving artifacts to the Trash page) Notes about restoration Notes about permanent deletion
Attachments    

To permanently delete an attachment, you must permanently delete an artifact that it is attached to. As you delete the artifact, a dialog box to permanently delete its attachments opens.

Deleted attachments are not included in the artifact editors, but are still functional for test data and displayed in the rich-text editor. You can restore deleted attachments from the Trash page or permanently delete them if you have that permission assigned. The rich-text editor displays a file-not-found link for the permanently deleted attachment.

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.

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. Before you delete the build definition or build record from Rational® Quality Manager, delete it from the external tool.

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.

   
Category Category values are also moved to the Trash page. 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.
Channels     You can permanently delete channels.
Custom attribute     The custom attribute is removed from all of the artifacts.
Enumerated Custom Attribute Value     You can permanently delete enumerated custom attribute values. After they are deleted, they are no longer visible on execution scripts.
Execution schedules The deleted execution schedule and its associated results are moved to the Trash page. The deleted execution schedule can not be restored. Administrators can permanently delete the deleted execution schedule and its associated results from the Trash page. When an execution schedule is permanently deleted, its associated results are also deleted.

After execution schedules or their results are permanently deleted, they cannot be restored and are not listed in the Audit view.

Execution schedule results The Execution schedule results are deleted when its associated execution schedule is deleted. You can also delete it from the execution schedule results history table. The deleted results are moved to the Trash page. The name of the deleted result include Result - <schedule name> to clearly indicate to which schedule the deleted result belongs to. The deleted execution schedule results can not be restored. Administrators can permanently delete the deleted execution schedule results from the Trash page.

After execution schedules results are permanently deleted, they cannot be restored and are not listed in the Audit view.

Keywords    

You can permanently delete all keyword attachments.

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

Project Execution Variable     You can permanently delete project execution variables. After they are deleted, execution variables are not visible in the artifact that they belong to, not even during an execution or execution result. All of their execution values are also deleted.
Quality Objectives   The deleted quality objectives are visible in the Trash page and can be restored from there. You can permanently delete quality objectives. If the deleted objectives are associated to test plans, they will not be visible anymore.
Template Administrators can restore deleted artifact templates from the Trash page. You can permanently delete templates. These permanently deleted artifact templates are visible in the audit history view. However the template's associated sections are not deleted.
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.

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

You can permanently delete a test case.

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 case execution record All of the associated test case results are moved to the Trash page.

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.

You can permanently delete a test case execution record.

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 cell The Test cell is deleted from the test cell table view and moved to the Trash page. You can restore the deleted Test cell from the Trash page. You can permanently delete a test cell from the Trash page.
Test data    

You can permanently delete all test data attachments. Test data with an associated data file that is permanently deleted is not functional.

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

Test executions using the deleted test data will fail. If you open the test data in the editor, you are warned to delete the test data or use another data file.

Test plan  

You can permanently delete a test plan.

You can permanently delete all test plan attachments.

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

Test script    

You can permanently delete a test script.

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 page. All of the associated test suite execution records and test suite results are also restored.

You can permanently delete a test suite.

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 suite execution record All of the associated test suite results are moved to the Trash page.

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.

You can permanently delete the test suite execution record.

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.

Table 2. Artifacts that support permanent deletion but are not visible in Trash view
Artifact Description
Adapter task Adapters can be deleted from the adapter console.
Artifact execution variable and values Both are deleted when they are removed from the containing artifact.
Automation Completed and canceled automation jobs are automatically deleted in a daily task.
Baseline Redacted when its parent component is redacted.
Component Supports redact (item is not deleted but sensitive data is modified to a deletion message).
Execution request Requests completed or canceled are automatically deleted in a daily task or when its test case result is deleted.
Execution variable Execution variables are deleted and no longer visible when they are removed from the artifacts (test cases, test suites, execution scripts, keywords, or execution results) that contain them.
Formal review All formal review data is deleted when the containing artifact is permanently deleted.
Lab resource type attribute Allowed to delete hidden items from the catalog. Deletion is permanent. Also, an attribute is deleted when its containing type is deleted.
Lab resource type Allowed to delete hidden items from the catalog. Deletion is permanent.
Project execution variable value Values are deleted when the project execution variable they belong to is permanently deleted.
Request Requests for lab management are deleted after period specified in the task DeleteInactiveRequestsTask on the administration page, under Advance Properties. Set the Expiration Period property to the expiration time. By default, this task is not run.
Reservation Canceled and ended reservations are deleted by a daily task.
Sizing record Deleted when purging containing test plan.
Stream Redacted when its parent component is redacted.
Test data variable Permanently deleted when its related test data is permanently deleted.
Test schedule Test schedules are permanently deleted when its parent test plan is also deleted permanently.
For details on permanently deleting lab resources, see Deletion and restoration of lab resources.