Details
-
Bug
-
Status: Waiting Approval
-
Medium
-
Resolution: Unresolved
-
Xray Cloud 16.29.0
-
None
-
None
-
Xray Cloud, Jira Cloud, Backup REST API v2 (POST /api/v2/backup)
Description
Description
When a backup is generated through the Backup REST API v2 with withAttachment set to true, the backup file respects the modifiedSince and projectIds filters but the attachment zip does not. The attachment zip always contains every Xray attachment in the instance (Test step attachments and Test Run evidences), regardless of the filters sent.
Pre-conditions
- At least two projects with Xray data and attachments (Project A and Project B)
- In Project A, Tests A, B and D created with step attachments
How to reproduce
- Note the current date and time as T1
- After T1, leave Test A untouched, edit a step of Test B without changing its attachment, create Test C with a step attachment and add a second attachment to Test D
- Generate a backup with POST /api/v2/backup using {"projectIds": ["<Project A id>"], "withAttachment": true} and download both files
- Generate another backup with {"projectIds": ["<Project A id>"], "modifiedSince": "<T1>", "withAttachment": true} and download both files
- Compare the backup files and the attachment zips of both runs
Actual result/Attachments
The backup files are filtered correctly. The first one has all Tests of Project A and the second one only has Tests B, C and D.
The attachment zips are identical in both runs (same files, same CRCs, same metadata_0.json). The second zip still includes the attachment of Test A, which wasn't modified after T1, and both zips include attachments of Tests and Test Runs from Project B.
Expected result
The attachment zip only includes attachments of the entities included in the backup file, following the same modifiedSince and projectIds filters.
Version
- Xray Cloud 16.29.0
Workaround
None known. The metadata_0.json in the attachment zip can be used to keep only the attachments related to the entities in the backup, but the full attachment set still has to be generated and downloaded first, which isn't feasible on instances with a large volume of attachments.
Attachments
Issue Links
- duplicates
-
XCC-4017 Loading...