Hello,
I was wondering if it' possible to create a post function to send an email notification to a recipient specified in a custom field, could be free text, label field etc.
I've done something similar in Jira Server (Which was so easy to code in) but wanted to replicate this over to the cloud (as a business decision to migrate over) and wasn't able to find anything but the following:
def resp = post("/rest/api/2/issue/${issueKey}/notify")
.header("Content-Type", "application/json")
.body([
subject: 'Mail title',
textBody: "Body",
htmlBody: "<p>Body</p>",
to: [
users: [[
name: "username",
active: true
]]
groups: [[
name: 'some group'
]]
]
])
.asString()I was sure how the string email address value can be added to the to key and also wondered if 'cc' would also work?
Any suggestion or guidance would be a great help thank you.
I'd really want to avoid webhooks for now
Many thanks!