When creating a new release in Jira, I would like the approvers listed on the Release to be emailed so that they have to give their approval before the Release may be released. Is there a way to do this?
Hello @Noah Kaufman
Welcome to the Atlassian community.
EDIT: Automation Rules do have a Version Created trigger. Ignore the next two paragraphs about webhooks.
The Automation Rules feature doesn't have a trigger for Release Created. However System Webhooks are able to listen for that event.
https://support.atlassian.com/jira-cloud-administration/docs/manage-webhooks/
You could create an Automation Rule that is triggered by an Incoming Webhook. You could provide that webhook information to a System Webhook which would call the Automation Rule when a new Release was created. You would pass the Release/Version ID from the System Webhook through the Incoming Webhook into the Automation Rule.
I haven't found a smart value for accessing the Approvers for a version. {{version.approvers}} doesn't return anything.
You could use a Send Web Request action to call the REST API to get the list of approvers for the release:
/rest/api/3/version/{releaseID}?expand=approvers
However, that gives you only the Atlassian Cloud account IDs for the users. I think you might then have to execute addition REST API calls to get the email address for each user. I haven't tried to actually work through this end-to-end.
Here is an article discussing how to work with Send Web Request to interact with the Jira REST API from within an Automation Rule.
@Tom Mike is correct, and I was wrong. I must've had a typo in my search in my Jira instance.
There IS a Trigger in Automation Rules for Version Created.
All the info I said about setting up a rule with an Incoming Webhook and using a System Webhook was unnecessary.
Also, in the Send Email action I have seen Approvers as an option to select in the To field in other scenarios. I did not check if it was an option in this scenario. If it iss then what I said about needing to use Send Web Request actions might also be unnecessary.
At the end of a long day, sometimes my brain stops working. :-\
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Noah Kaufman
Were you able to solve your need with the information I provided? If so, please consider clicking the Accept Answer button to mark your post as solved. It would also be great if you update this post with the details of your solution.
If you have more questions about this topic, please let us know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.