if (jiraResult.status == 200) {
def jiraFields = jiraResult.body.fields
def webhookUrl = 'https://hooks.slack.com/services/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'
def msg = [
text: """${issue.fields.reporter.displayName} raised a ticket on PSO that we think should be handled by @bs2:
def issueKey = issue.key
for (item in changelog.items) { logger.info(item.field) if (item.field == "labels") { def labels = issue.fields.labels?.join(", ") println(labels)
if (labels == "lvl2-business") { def jiraResult = get("/rest/api/2/issue/${issueKey}") .header('Content-Type', 'application/json') .asObject(Map)
https://tideaccount.atlassian.net/servicedesk/customer/portal/20/${issue.key} - ${issue.fields.summary}""" ]
} }