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?
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
There is a Security Scheme in the project but how can I find out if this is the reason?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Konstantinos Antonakopoulos
Welcome to the Atlassian Community
Were you able to update it from UI?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.