Bhavya-org / Scripts

0 stars 0 forks source link

Swathi Expenses formate #11

Open sani-d opened 1 month ago

sani-d commented 1 month ago

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() }