Bhavya-org / Scripts

0 stars 0 forks source link

Send to To Do #48

Open Bhavya-ss opened 1 week ago

Bhavya-ss commented 1 week ago

def issueKey = issue.key def changeType = issue.fields.customfield_10005?.value if(changeType=="Normal") { def transition = post("/rest/api/2/issue/" + issueKey + "/transitions") .header("Content-Type", "application/json") .body([transition: [id: 21]]) .asObject(Map)

if (transition.status == 204) {
    println("Transition done")
} else {
    println("Transition failed: ${transition.status} - ${transition.body}")
}

} else { println("Condition not met") }