Hi,
I need some help designing an automation that sends an email to the user who has been unassigned from an issue. Jira currently sends notification emails to the assignee, however I want them to get an unassigned email so they don't waste time clicking on the notification.
What conditions would I have to add to make the automation execute what I'm asking for?
Thank you!
Hi @Jade Tran
What version of Jira are you using, as that impacts automation features: Cloud, Server, or Data Center?
Until we know that...
For Jira Cloud with the rule trigger Issue / Work Item Assigned, the changelog smart value contains the accountId of the previous user:
{{#changelog.assignee}}{{from}}{{/}}
But it does not contain the email address. Thus a rule would need to check if that value is not empty, and then call the REST API with the Send Web Request action to get the user's email address.
Kind regards,
Bill
If your trigger is specifically looking for when Assignee has changed, a slightly shorter option is fieldChange:
{{fieldChange.from}}
Although like Bill's recommendation of changelog, this also only returns the UserId (ex: 712020:5e51f2de-a70b-4033-bb49-06685ba05b6c), which then you need to make an API call to lookup the email based on the UserId.
One way to do that would be the Get user API call.
HOWEVER, that call respects user profile privacy settings. So if your users are not in all in the same organization (the default is that emails are visible to other organization members) the call will probably not return the email address.
If you have users outside of your organization, you may need to try using this Organization REST API endpoint: Search for users in an organization.
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.