Hello
I am trying to create a scripted field which will return me a email address. This is so that I can search based on the scripted field for issues created by a particular email domain.
I have tried like this but does not work..
How do I get domain of the reporter.
// Fetch the issue object from the key using the Jira Software API
def issue = get("/rest/agile/1.0/issue/${issue.key}")
.header('Content-Type', 'application/json')
.asObject(Map)
.body
//String reporterEmailAddress = issue.fields.reporter.emailAddress
// Get the Story Points custom field to use in the script
// Get the field ids
def fields = get('/rest/api/2/field')
.asObject(List)
.body as List<Map>
def creatorField = fields.find { it.name == "Creator" }?.id
return creatorField.emailAddress
//return issue.fields.creator.emailAddress
Thanks
Abe