---
title: "Data Volume Management"
canonical: "https://docs.getxray.app/space/XRAY/1062240261/Data%20Volume%20Management"
format: markdown
---
> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> > Macro (toc)

# Introdution

Data Volume Management allows you to automatically manage and reduce stored data based on configurable criteria. You can define which items are affected, how old they must be, and whether they should be archived or deleted.

# Operations

## Enabling Data Volume Management

> ⚠️ Jira Admins only.

Jira Dava Volume Management can be enabled or disabled at the top of the page using the toggle. Enabling or disabling is automatically saved when the toggle value changes.

## Selecting Issues

Jira Admins can select which entities they wish to manage (archive or delete).

> ⚠️ A subtask of an Issue that matches the criteria below will also be archived or deleted, like its parent task.

- **Tests with no executions: **Tests that are not linked to a [Test Execution](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/160137357), i.e, were not executed yet.
- **Precondition not associated with any Test:** a precondition that was not linked to any Test.
- **Test Sets with no Tests: **[Test Sets](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/162332685) that have no Tests linked to them.
- **Test Executions never executed: **Test Executions that have tests linked to them, with *TODO* status.
- **Test Executions with no tests: **Test Executions with no Tests linked to them.
- **[Redundant Test Runs](https://getxraydocs.atlassian.net/wiki/spaces/X710/pages/744030209)**** **(same results and scope in a single day):
  - **Preserve Test Runs with attachments: **if checked, a [Test Run](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301502714) with evidence uploaded is never considered redundant.
  - When the conditions are met, duplicate Test Runs are always deleted, even when the action is *ARCHIVE*.
- **All Xray Jira Issues: **every Issue Type created by Xray (Test, Test Set, Test Plan, Test Execution, and Precondition) with or without links to other Xray Issue types. When this option is selected, the Redundant Test Runs option is ignored as the Tests and Test Executions are already included.

## Criteria of selection

The entities selected in the above section will be included if they meet the criteria in the criteria section.

- **Older than: **Entities must be older than the selected value. This value is relative, i.e, entities that are not picked one day can be later in time as they will match the older than criteria.
- **Workflow Statuses: **Only entities in the selected statuses will be picked. This option is not applied to the Redundant Test Runs option.
- **Projects: **Only entities from the selected projects are picked.

## Validate Entities

The entities that are candidates for selection can be validated by using the option to check issues in Jira or by exporting to CSV.

**View top 500 in Issue Navigator: **the top 500 entities that will be picked by the service can be checked on Jira search

**CSV export: **If you wish to check the entire list of candidates the service will pick, you can generate a CSV containing all entities. This action can potentially load a lot of information. If the screen takes time to respond, please wait.

## Schedule

You can configure a recurrent service to run the Data Volume Management Service. This will create a Jira Service.

### Save

This action will save the current configuration (Figure 1).

![Figure 1 - Valid](media://4dae4845-20a8-40cc-a593-50fd1ce4faf4)


It is possible to save a configuration deemed invalid/incomplete (Figure 2). For instance, saving a configuration without a Project or without a workflow associated will result in the service not running on any Issue.

![Figure 2 - Invalid](media://9fc2d6d4-2774-4850-90e4-6851c3655c52)

### Run Now

This action will save the current configuration and launch the service immediately (Figure 3; Figure 4). 

![Figure 3 - Run.png](media://48470bb1-a0f2-40eb-849c-f87dc3ea96ae)

![Figure 4 - Run.png](media://c82855d3-75bd-4e64-9596-3fb7de38c663)

If an invalid/incomplete configuration is selected, the button will be disabled. 

# Concepts

## Redundant Test Runs

For two or more Test Runs to be considered redundant, they must have identical properties. Please find the Grouping Criteria below:

- They are testing the** **same Test (linked to the same Test Definition (i.e, Test version)).
- They have a finish date, and they** **finished the same day.
- They have a final status** **(e.g., *PASS*, *FAIL*) in the property *Test Run Status*.
- They have the same [status](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/160170368/Execute+Tests#ExecuteTests-ExecutionStatus).
- They were executed by the same user.
- Test Executions have the same fix version(s).
- Test Executions have the same [environment(s)](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301665065).
- The Test Run [comments](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/160170368/Execute+Tests#ExecuteTests-Comment) are identical.

### Selection Rule (Which One Survives?)

- **The Survivor:** the latest created Test Run in an identical group is kept.
- **Archived Runs:** archived runs are ignored by the logic - they cannot be deleted nor cause an active run to be deleted.

### What Excludes a Test Run from Being Considered Redundant? 

A Test Run is not considered redundant (and thus never deleted) if it contains:

- **Defects:** any defect linked to the run.
- **In case *****Preserve***** is checked:**
  - **Evidence:** any file attached directly to the Test Run.
  - **Evidence:** any attachment linked to a Test Run Result (e.g., Log files, screenshots).
  - **Step Evidence:** any attachment linked to a specific Test Step.
  - **Example Step Attachments** (for Cucumber/Scenario Outlines): any attachment on example steps.
- **Step Actual Results:** any text in the *Actual Result* field of a step.

#### Examples

##### Three Redundant Test Runs (Figure 5)

![Figure 1 - Example](media://713eab5c-68cc-4720-8ace-7dd8e75f5193)

###### After Running the Service (Figure 6)

![Figure 6 - Example](media://38a9eaa8-38cd-4814-b0ef-50fe6fc024b9)

##### Example of three Test Runs Executed the Same Day (Figure 7)

But not redundant because they have different status, in this case.

![Figure 7 - Example](media://a39aede7-f9d4-4959-8ffc-0f13cc8dd69c)

##### Example with Archived Test Runs

These Test Runs (Figure 8 - 1) are identical but belong to Test Executions that are archived.

![Figure 8 - Example](media://1b4593e0-f66b-4e5a-8328-75e240cb19ae)

##### After Running the Service

These Test Runs (Figure 9 - 1) are still associated with the Test.

![Figure 9 - Example](media://16c5b29a-5106-4274-9b06-293fc26c3eb7)

##### Test Runs with Evidence 

The option *Preserve Test Runs with evidences* (Figure 10) will make Xray preserve any Test Runs with evidences even if repeated with another.

![Figure 10 - Preserve Test Run with Evidences](media://7cb20c82-669e-4aa8-b26d-0f51e38f415b)

###### Example

Two Test Runs are identical (Figure 11) according to the criteria of redundancy, but have attachments.

![Figure 11 - Example](media://b9c451e9-a25e-4304-877b-494b5fac579d)

- Executing the service with* Preserve Test Runs with attachments* checked (Figure 10) will preserve both Test Runs.
  - Xray will not act on any Test Run that has evidences even if these evidences are identical to another redundant Test Run (Figure 11).
- Executing the service with *Preserve Test Runs with attachments* unchecked (Figure 10) will delete the oldest Test Run of the two.
  - Xray will not verify the number, name, size, or content of the attachments.

![Figure 12 - Example](media://580efa8c-7727-4cbd-849f-8be53784cce2)

### What is Not Considered when Searching for Redundant Test Runs

#### Data Set (Figure 13 - 1)

![Figure 13 - Example](media://8ea7afbc-82b3-4852-ab9a-82c218edd917)

#### Test Step Status

If two Test Runs have the same Grouping Criteria, even if some Test Step status is different, they will be considered the same and be deleted.

Example: two Test Runs are identical (Figure 14) even if the Test Step statuses are different (Figure 14).

![Figure 14 - Example](media://7c1432ee-52fb-4ee2-95bb-57874b70e60e)

##### After Running the Service (Figure 15)

![Figure 15 - Example](media://b835a561-8760-49b2-9022-5386098125fd)

##### Test Execution and Sub-Test Executions are Considered the Same

In case you have two identical Test Runs (Figure 16 - 1), one created from a Test Execution and another created from a Sub-Test Execution, Xray will consider one of them as redundant.

E.g.: a user creates a Sub-Test Execution with the same information as an existing Test Execution and executes it with the same status. Xray will pick the oldest of that day and delete its Test Run.

![Figure 11 - Example](media://b11b5c37-c156-4807-bb4a-7973384d8997)


> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> If you have questions or technical issues, please [contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28) or [send us a message using the in-app chat](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301501383).