Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ScriptRunner: Rest API issue notify for service request participants

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

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

675 views 5 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you