Open Bhavya-ss opened 1 week ago
?// Used in Postfunction for Send slack message when issue transitioned to Confirmed
def issueKey = issue.key def jiraResult = get("/rest/api/2/issue/${issueKey}") .header('Content-Type', 'application/json') .asObject(Map)
if (jiraResult.status == 200){ def jiraFields = jiraResult.body.fields def webhookUrl = 'https://hooks.slack.com/services/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'
def msg = [
text: "The following issue has been transitioned to Confirmed https://tideaccount.atlassian.net/browse/${issueKey}"
]
post(webhookUrl)
.header('Content-Type', 'application/json')
.body(msg)
.asString()
} else { println "Failed to find issue: Status: ${jiraResult.status} ${jiraResult.body}" }
def issueKey = issue.key
def toStatusArray = ["In Progress"]
for (item in changelog.items) { logger.info(item.field) if ( item.field == "status" ) { if ( (toStatusArray.contains(item.toString)) ) { def jiraResult = get("/rest/api/2/issue/${issueKey}") .header('Content-Type', 'application/json') .asObject(Map)
https://tideaccount.atlassian.net/${issue.key}""" ]
} } }