Hi,
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')
.body([
fields: [
status: "[self:https://domain.com.atlassian.net/rest/api/2/status/3, description:This issue is being actively worked on at the moment by the assignee., iconUrl:https://domain.com.atlassian.net/images/icons/statuses/inprogress.png, name:In Progress, id:3, statusCategory:[self:https://domain.com.atlassian.net/rest/api/2/statuscategory/4, id:4, key:indeterminate, colorName:yellow, name:In Progress]]"
]
])
.asString()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")
.asObject(List)
.body
.findAll { (it as Map) } as List<Map>
def statusField = fields.find { it.name == 'Status' }
logger.info("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