Open sani-d opened 5 months ago
def issueKey = issue.key
def requestType = issue.fields.customfield_10010?.requestType?.name
if (["Budget - Cost Approval", "Budget - SSOT Change requests", "Budget - New Headcount Request", "PUR - New Software Budget Approval Request", "PUR - Software Procurement Approval", "PUR - Software Renewal Approval"].contains(requestType)) {
def newAssigneeAccountId = '5d8ce04a6e35df0c4997a324' // Use the account ID of the new assignee def updateResult = put('/rest/api/3/issue/' + issueKey + '/assignee') .header('Content-Type', 'application/json') .body([ accountId: newAssigneeAccountId ]) .asString() } else { println("Request type is not 'Budget - Cost Approval', 'Budget - SSOT Change requests', 'Budget - New Headcount Request', 'PUR - New Software Budget Approval Request', 'PUR - Software Procurement Approval', 'PUR - Software Renewal Approval', skipping automated comments.") }
def issueKey = issue.key
def requestType = issue.fields.customfield_10010?.requestType?.name
if (["Budget - Cost Approval", "Budget - SSOT Change requests", "Budget - New Headcount Request", "PUR - New Software Budget Approval Request", "PUR - Software Procurement Approval", "PUR - Software Renewal Approval"].contains(requestType)) {
def newAssigneeAccountId = '5d8ce04a6e35df0c4997a324' // Use the account ID of the new assignee def updateResult = put('/rest/api/3/issue/' + issueKey + '/assignee') .header('Content-Type', 'application/json') .body([ accountId: newAssigneeAccountId ]) .asString() } else { println("Request type is not 'Budget - Cost Approval', 'Budget - SSOT Change requests', 'Budget - New Headcount Request', 'PUR - New Software Budget Approval Request', 'PUR - Software Procurement Approval', 'PUR - Software Renewal Approval', skipping automated comments.") }