Open Bhavya-ss opened 3 weeks ago
def issueKey = issue.key def issuetype = issue.fields.issuetype.name
if (issuetype == "Sub-task") { def result = put("/rest/api/2/issue/${issueKey}") .header('Content-Type', 'application/json') .body([ fields: [ customfield_10005: [value: "Normal"], customfield_10248: ["TPL"] ] ]) .asString()
if (result.status == 204) { println("Issue ${issueKey} successfully updated.") } else { println("Failed to update issue ${issueKey}. Status: ${result.status} ${result.body}") }
} else { println("Issue ${issueKey} is not a sub-task.") }
def issueKey = issue.key def issuetype = issue.fields.issuetype.name
if (issuetype == "Sub-task") { def result = put("/rest/api/2/issue/${issueKey}") .header('Content-Type', 'application/json') .body([ fields: [ customfield_10005: [value: "Normal"], customfield_10248: ["TPL"] ] ]) .asString()
} else { println("Issue ${issueKey} is not a sub-task.") }