Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I email a list of users from a custom Context Field?

drgilby October 11, 2022

I have created a custom Context Field under Project Settings -> Issue Types. I have used the People type so I can select many users. I want to set up an email automation that can email the users selected, but when I dereference my custom field using smart values ({{customfield_15308}}) (by printing it out in the body of the email), I don't see an email address property there. If I drop it in the To field, I just get the error below

Send email
Could not send email, the 'To' address field is empty. If you have referenced a field it may be empty.
Is there a way to send an email to each person in my custom Context Field using automation? Everything I have tried has failed thus far.

Thanks!

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2022

Hi @drgilby 

Are you trying this in a team-managed project with the People field type?

If so, automation rules cannot support that field type yet.  Here is a suggestion to support that, which you may watch/vote for to see progress: https://jira.atlassian.com/browse/JSWCLOUD-22200

Kind regards,
Bill

drgilby October 12, 2022

Thanks for the response. We do have a Team-managed project and I upvoted that feature request.

Ultimately what I would like to do is be able to specify a list of stakeholders for an issue and use automation to email them when the issue moves to a specific state (i.e. it's ready for a stakeholder to review the item). Maybe there is a built-in field that might work rather than me creating a custom field? 

 

Thanks again for the response.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 12, 2022

Until that suggestion/defect with People-type fields is addressed, the options are limited...

  • create a saved filter to detect when issues transition to that specific status, tell stakeholders about the filter, and let them subscribe to it at their desired cadence
  • add all the interested stakeholders as issue "watchers", and let them add/remove what they want to see via their profile.  It will be a bit noisier than your idea of only notifying on one specific transition, but it is easy.
  • add their email addresses explicitly to another field (e.g. text) and parse those for notification in the automation rule
  • and the brute force solution: using the values in the people field, let the automation rule repeatedly call the REST API to get their user information and email address, sending an email for each.  This one seems a bad idea, as the rule will be slow and could lead to rule throttling/usage limit issues
drgilby October 12, 2022

Great suggestions. I was going to go with option 3 in your list, but was holding out for a better solution :).

Thanks again, I have what I need and have upvoted that feature request.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events