Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Obter Key testcycles vinculado ao issue Jira

Ramon Henrique Palmeira Santos
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 26, 2025

Tenho uma História no Jira que possui Test Cycles vinculados através do plugin Zephyr Scale. No entanto, ao tentar obter os Test Cycles vinculados usando o GET para o endpoint: https://DOMAIN.atlassian.net/rest/api/2/issue/IMP-123456

não estou conseguindo visualizar as informações do Test Cycles Key no ResponseBody.

Quando faço a busca no processo inverso (Zephyr Scale >> Jira), consigo identificar a chave da issue. Contudo, no processo Jira >> Zephyr Scale, não estou obtendo os resultados esperados.

1 answer

0 votes
Jorge Cammarota
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 26, 2026

It’s a common point of confusion, but you are absolutely right. You won't find the Test Cycle Key in the standard Jira endpoint (/rest/api/2/issue/{issueKey}), even if Zephyr Scale is active. This is an architectural limitation: cycles are objects within the Zephyr Scale app, not "native" Jira fields.

Here is the breakdown of how this works and how to solve it in English:
The Jira ↔ Zephyr Scale Relationship

Zephyr Scale → Jira: Zephyr knows which Jira issue is linked because it stores that relationship in its own database (and displays it via its own UI/API).

Jira → Zephyr Scale: Jira does not "see" the cycles as structured fields or links within the issue's JSON.

When you call GET /rest/api/2/issue/IMP-123456, the response will not contain testCycles, cycleKey, or similar. Even if you inspect customfield_xxxxx or issuelinks, the information isn't there unless you manually populated a custom field via automation.
How to Get Test Cycles for an Issue

To retrieve this data, you must query the Zephyr Scale API directly, not just the Jira API.
1. Use the Zephyr Scale Cloud API

According to the SmartBear documentation, you should use the following endpoint structure:

Endpoint: GET https://api.zephyrscale.smartbear.com/v2/testcycles?issueKey=IMP-123456

Sample Response:

[
{
"key": "TC-123",
"name": "Regression Cycle",
"projectKey": "IMP",
"status": "In Progress",
"linkedIssues": ["IMP-123456"]
}
]

The key field here is exactly what you are looking for.
2. Integration Workflow

If you are building an automation (e.g., a webhook), your flow should look like this:

Trigger: Receive a Webhook or perform a GET on the Jira Issue.

Extract: Grab the issueKey (e.g., IMP-123456).

Request: Call the Zephyr Scale API passing issueKey=IMP-123456.

Parse: Extract the Cycle Keys from the returned JSON.

Why does it show in the UI but not the API?

In the Jira UI, the Zephyr tab/panel is an iframe or a plugin component loaded by the Zephyr Scale app. It calls its own backend, resolves the cycles, and renders them inside Jira. The native Jira REST API remains unaware of this third-party relationship.
Can I pull this directly from the Jira API?

Only if you "force" the data into Jira:

Create a Custom Field in Jira (e.g., "Linked Test Cycles").

Set up an Automation (via ScriptRunner, Jira Automation, or Zephyr Webhooks).

Every time a cycle is linked, have the automation update that custom field via the Jira API.

Then, and only then, will GET /rest/api/2/issue/{key} include the keys.

Summary

To get Test Cycle Keys linked to a Jira issue, you must query the Zephyr Scale API filtering by issueKey. The standard Jira /rest/api/2/issue/{key} endpoint does not expose this information.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events