Example scripts
To homepage
Jira Service Desk

Get Domain Name from Participants Email
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira Service Desk (4.5 - 4.20)

ScriptRunner For Jira (6.45.0)
Language |
groovy
import groovy.json.JsonSlurper
//Set the base url of your jira instance
def baseUrl = '<JIRA_BASE_URL>'
//Specify the issue key
final def issueKey = '<ISSUE_KEY>'
final def restEndpointName = 'getParticipantsEmail'
def hostUrl = "${baseUrl}/rest/scriptrunner/latest/custom/${restEndpointName}?issueKey=${issueKey}"
def response = hostUrl.toURL().text
def json = new JsonSlurper().parseText(response)
def artifacts = json.collect().sort()
artifacts.each {
log.warn "${it.toString().split('@').last()}"
}
Having an issue with this script?
Report it here