the Service management has a new concept of 'Request participants'
I need to notify them along with reporter and assignee from my script listener
Is there an easy or proven working way to do that? I'd appreciate not spending few hours figuring this out ;)
here is the call that works for other folks looks like:
def resp = post("/rest/api/2/issue/${issue.id}/notify")
.header("Content-Type", "application/json")
.body([
subject: theSubject,
textBody: textMessage,
htmlBody: htmlMessage,
to: [
reporter: true, // bug - 500 error when no reporter
assignee: true, // bug - 500 error when no assignee
// watchers: true,
// voters: true,
// users: [[
// name: 'admin'
// ]],
// groups: [[
// name: 'group name here'
// ]]
]
])
.asString()
assert resp.status == 204
It is taken from example snippet in ScriptRunner docs. I'm sure I can extract users from the field and add them individually. Anybody done that?
the field is preinstalled locked custom field of it own kind
in my case customFieldId=10027