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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Is it possible to change an issue status using Script runner Cloud


I am trying to change an issue Status (To Do, In Progress or Done), using the following simple method

// Code 1

def result = put("/rest/api/2/issue/${parentEpicKey}")
.header('Content-Type', 'application/json')
fields: [
status: "[self:, description:This issue is being actively worked on at the moment by the assignee., iconUrl:, name:In Progress, id:3, statusCategory:[self:, id:4, key:indeterminate, colorName:yellow, name:In Progress]]"
I get the following error : 
{"errorMessages":[],"errors":{"Status":"Field 'Status' cannot be set. It is not on the appropriate screen, or unknown."}}
       |                    false


I have already extracted the value of Status for tickets with this :

//Code 2
def fields = get("/rest/api/2/field")
.findAll { (it as Map) } as List<Map>

def statusField = fields.find { == 'Status' }"statusField : ${statusField}")

which prints the values I am trying to assign to Status in Code 1.


Does anyone have any idea please on what I am missing ?

Thank you


2 answers

1 accepted

5 votes
Answer accepted
Nir Haimov Community Leader Jan 14, 2019


Yes you can, use:

POST /rest/api/3/issue/{issueIdOrKey}/transitions

in your body you need to send:

"transition": {
    "id": "5"


Read this:

Status is not a field you can just edit, it is an indication of where an issue is in the process.  To change it, you must use a transition to move the issue through it.

Thank you I wasn't aware of that, however the transition is Empty


// Get available transitions
def transitions = get("/rest/api/3/issue/${parentEpicKey}/transitions")
.issues as List<Map>"transitions: ${transitions}") // Returns Null

// To find the Transition ID, is there any way to not start guessing
// Error "Transition id '2' is not valid for this issue
def result2 = post("/rest/api/3/issue/${parentEpicKey}/transitions")
.header('Content-Type', 'application/json')
transition: [
"id": "3"

Thank you, I wasn't aware of Transitions however the value seems to be empty to know which ID to send.

// Get available transitions
// Returns Null

def transitions = get("/rest/api/3/issue/${parentEpicKey}/transitions")
.issues as List<Map>"transitions: ${transitions}")

// Tried few IDs from the status or just as a guess nothing seems to be working
//"Transition id '3' is not valid for this issue
def result2 = post("/rest/api/3/issue/${parentEpicKey}/transitions")
.header('Content-Type', 'application/json')
transition: [
"id": "3"

You need to use a transition that exists and your user has permission to use.  This depends on what status the issue is currently in and what your workflow says.

Worked like a charm, Thank you @Nir Haimov and @Nic Brough -Adaptavist- for the support, Appreciated 

hey can u help me u do u do that ?

@Mohammed-Amine Rouh
I suppose you have found the answer, as this thread is more than 3 years old. Anyway for others (like me): you may find the transition ID in the workflow configuration, text mode.


Suggest an answer

Log in or Sign up to answer