Skip to content

Commit 068e436

Browse files
authored
Merge pull request #185 from qase-tms/add-run-update-external-issue-specs
feat: add endpoint to update external issue links for test runs
2 parents 65bfbda + 8fd7cd7 commit 068e436

File tree

5 files changed

+79
-1
lines changed

5 files changed

+79
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: include
22
in: query
33
description: |
4-
Include a list of related entities IDs into response. Should be separated by comma. Possible values: cases, defects
4+
Include a list of related entities IDs into response. Should be separated by comma. Possible values: cases, defects, external_issue
55
schema:
66
type: string
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
post:
2+
operationId: run-update-external-issue
3+
tags: [ runs ]
4+
summary: Update external issues for runs
5+
description: |
6+
This method allows you to update links between test runs and external issues (such as Jira tickets).
7+
8+
You can use this endpoint to:
9+
- Link test runs to external issues by providing the external issue identifier (e.g., "PROJ-1234")
10+
- Update existing links by providing a new external issue identifier
11+
- Remove existing links by setting the external_issue field to null
12+
13+
**Important**: Each test run can have only one link with an external issue. If a test run already has an external issue link, providing a new external_issue value will replace the existing link.
14+
15+
The endpoint supports both Jira Cloud and Jira Server integrations. Each request can update multiple test run links in a single operation.
16+
17+
parameters:
18+
- $ref: '../parameters/Code.yaml'
19+
20+
requestBody:
21+
required: true
22+
content:
23+
application/json:
24+
schema:
25+
$ref: '../schemas/Run.external_issues.yaml'
26+
27+
responses:
28+
200:
29+
description: OK.
30+
400:
31+
description: Bad Request.
32+
401:
33+
description: Unauthorized.
34+
403:
35+
description: Forbidden.
36+
404:
37+
description: Not Found.
38+
429:
39+
description: Too Many Requests.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
type: object
2+
properties:
3+
type:
4+
type: string
5+
enum:
6+
- jira-cloud
7+
- jira-server
8+
links:
9+
type: array
10+
description: Array of external issue links. Each test run (run_id) can have only one external issue link.
11+
items:
12+
type: object
13+
properties:
14+
run_id:
15+
type: integer
16+
format: int64
17+
external_issue:
18+
type: string
19+
nullable: true
20+
minLength: 1
21+
description: An external issue identifier, e.g. "PROJ-1234". Or null if you want to remove the link.
22+
required:
23+
- run_id
24+
required:
25+
- type
26+
- links

testops-api/v1/schemas/Run.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,14 @@ properties:
110110
items:
111111
type: integer
112112
format: int64
113+
external_issue:
114+
type: object
115+
nullable: true
116+
properties:
117+
id:
118+
type: string
119+
type:
120+
type: string
121+
link:
122+
type: string
123+
format: uri

testops-api/v1/src.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ paths:
102102
$ref: './paths/result_id_hash.yaml'
103103
/run/{code}:
104104
$ref: './paths/runs.yaml'
105+
/run/{code}/external-issue:
106+
$ref: './paths/runs_external_issue.yaml'
105107
/run/{code}/{id}:
106108
$ref: './paths/run.yaml'
107109
/run/{code}/{id}/public:

0 commit comments

Comments
 (0)