// Check conditions
if (['EE - Issues/Queries with Xero', 'EE - Access to XERO'].contains(requestType) &&
office == 'London') {
// Use the account ID of the new assignee
def result = put("/rest/api/3/issue/${issueKey}/assignee")
.header('Content-Type', 'application/json')
.body([
accountId: newAssigneeAccountId
])
.asString()
}
def issueKey = issue.key def requestType = issue.fields.customfield_10848?.requestType?.name.toString() def office = issue.fields.customfield_11095?.requestType?.name.toString() def newAssigneeAccountId = '6305b88c958ffd78c6e0e59e'
// Check conditions if (['EE - Issues/Queries with Xero', 'EE - Access to XERO'].contains(requestType) && office == 'London') { // Use the account ID of the new assignee def result = put("/rest/api/3/issue/${issueKey}/assignee") .header('Content-Type', 'application/json') .body([ accountId: newAssigneeAccountId ]) .asString() }