Bhavya-org / Scripts

0 stars 0 forks source link

Test null value #50

Open sani-d opened 1 week ago

sani-d commented 1 week ago

def issueKey = issue.key def requestType = issue.fields.customfield_10848?.requestType?.name def office = issue.fields.customfield_11095?.value.join(", ")

if (["Payroll - Other","Payroll - Payslips", "Payroll - Pension"].contains(requestType) && office == "London") {

def newAssigneeAccountId = '5cf14eff1552030f1e3a5ae6' // 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("Condition not met, skipping assignee changes.") }