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
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.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events