Forums

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

need help in automating the configuration of a defined epic as a parent of a test execution

pgarofal
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!
July 9, 2025

hi all,

giving the overall context befor coming to the specific help request.

I'm part of a QA team, I'm working to automate the creation of the xray test results corresponding to the tests executed with our test environment.

I've already done some steps within xray: got the keys to generate the token and then create a test execution adding the xray tests inside and filling the passed/failed/etc status

Now, the problem is that the test execution created is not linked to any parent, so we created within the jira structure an epic dedicated to put inside the test executions we create,

looking for details about how to automate the configuration of a defined epic as a parent of a defined test execution in the jira environment: api to be used - any example - can I use the same token generated for xray or does jira require a dedicated token or different security mechanism ?  things like that, any help will be appreciated

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
3 votes
Answer accepted
pgarofal
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!
July 9, 2025

hi,

resolved by myself, thanks.

for whoever is interested, this is the approach I followed:

1/ I created a JIRA token without scopes following the instructions found in this page:

https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

the page where the token is created is this : https://id.atlassian.com/manage-profile/security/api-tokens

2/ I edited the test execution issue (edit issue) doing a PUT request following the instructions of this page:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put

the request has this form (in the curl format):

curl --request PUT \
--url https://your-domain.atlassian.net/rest/api/3/issue/{issueId} \
--header 'Accept: application/json' \
--header 'Authorization: Basic {my_jira_token}' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"parent": {
"key": "{parent_ID}"
}
}
}'

 

 

 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events