Hi Alex,
Thank you for your question.
I can confirm in ScriptRunner for Jira Cloud that you can call the Issue API which is documented in the Atlassian documentation page located here with a Get request.
Calling this API will return the JSON for all fields on the issue and one of the fields inside of the JSON will be the Priority field and you will see in the JSON the structure used to store the data for the field in order to determine how to extract its value.
I can confirm that the easiest way to test this is to navigate to the Script Console page inside of ScriptRunner for Jira Cloud and to click on the link named Get Issue Fields in the Examples section below the code box.
This will populate the code box with an example script to call the Issue API and all you will need to is to change the issueKey variable to your Issue Key and run the script in order to return the JSON showing all the fields on the issue.
I hope this information helps.
Regards,
Kristian
In Jira Cloud, everything you do with Scriptrunner is by JIRA REST API.
So simply follow the REST API:
And create a listener in Scriptrunner to perform a REST API to get the issue priority
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not my area of expertise, but I found this answer in a similar question which might be of use :)
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stephen Wright _Elabor8_ ,
The answer you attached is for Jira Server.
It doesn't work on Jira Cloud
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.