Skip to main content
Example scripts
arrow icon
To homepage
Jira Service Desk
Data centre icon
Data Center

Get Domain Name from Participants Email

Tags
Created 1 year ago, Updated 27 day(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
Jira Service Desk (4.5 - 4.20)
compatibility bullet
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