Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bulk update XRay's Test Environments field

Konstantinos Antonakopoulos September 17, 2024

Hello! I am using Jira/XRay cloud version and would like to update XRay's Test Environments field for all existing Test Executions. I have tried to use the following api call but I am getting an error "Issue does not exist or you do not have permission to see it". 

The fail message is not really correct as I have admin rights in the system.

Here is the api call I am using:

 

curl --request PUT \ --url '<jira_issue>' \ --user '<username>:<token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "update": { "Test Environments": [ { "set": "New_test_environment" }] } }'

 

Any tips?

3 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Manuel
Contributor
November 3, 2024

As @Stefan Salzl  mentioned, the test environment is an internal attribute of Xray cloud data and not a custom field, so we cannot change it in bulk like we can do for custom fieds in Jira.

The GraphQL API also doesn't have a call for that; you can only update a given Test Execution, one by one, using this call.

I would recommend contacting Xray vendor asking for that feature, detailing what would you use it for.

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 20, 2024

Hi @Konstantinos Antonakopoulos 

is there a Issue Security Scheme in the project? This could still vause that issues are hided from you even if you are an administrator.

Best
Stefan

Konstantinos Antonakopoulos October 9, 2024

Hi Stefan,

There is a Security Scheme in the project but how can I find out if this is the reason?

 

 

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 9, 2024

Hi @Konstantinos Antonakopoulos 

If you are an administrator you should be able to login to the project and check if you can see the issue. Furthermore you could open the project configuration and view the issue security scheme. If an issue has set a security level that doesn´t consist of the administrator you won´t see this issue either as administrator.

Furthermore I guess the problem is not only (if at all) the security level:

Which rest-api are you calling? The field "Test Environment" is an xray specific field an cannot be set via the native jira rest-API. 

As far as I know this is even not possible via the XRAY Rest API but the XRAY graphQL API. See the following link:

https://us.xray.cloud.getxray.app/doc/graphql/addtestenvironmentstotestexecution.doc.html

 

Best
Stefan

Like Manuel likes this
0 votes
pinky_reddy
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 Leaders.
September 17, 2024

Hi @Konstantinos Antonakopoulos 

Welcome to the Atlassian Community

Were you able to update it from UI?

Konstantinos Antonakopoulos September 17, 2024

Thanks! Yes, it is possible to update the field for the real project from UI.

In our project, we have more than 100 Test Executions that need to be updated

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events