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

How to automatically email a User (selected from customField) once event triggered?

I am in the middle of trying to create a script/automated task to email a customfield user or comment with reference to a custom fields once an event has been triggered.

 

The process is;

1. When CustomField1 (Days until..) reaches below 60 an event is triggered

2. CustomField2 (Manager) will then be selected from its UserPicker field and emailed or tagged/mentioned in a comment about this (either way works)

I have tried using automation, however can't find a way to grab the user and email them, or find a way to reference the selected User from the CustomField into a comment.

 

Any advice would be greatly appreciated.

1 answer

What are you using for the automation? Hard to give an answer without that information.

That said, if you are firing a custom event, you can just add a notification rule to the notification policy to that event that can email users in a user picker custom field. 

We are using automation for Jira Lite.

I was using a jql query to schedule a comment action.

If you are using the "Lite" version, you are limited in that you don't have access to

  • Comment on issue Action
  • Send Email Action

https://docs.automationforjira.com/getting-started/getting-the-right-version.html#pro-vs-lite

Which makes this a little difficult. :)

But you do have access to the publish event action. So you can leverage that.

  1. Create a new Event (System Menu -> Events) Call it "coming due soon"
    1. Select the Generic Event template. This controls the email format that will be sent out.
  2. Now when you look at the notification scheme for your project, you should see your new custom event listed. Add a Recipient of a "User Custom Field Value" pointing to your custom field.
  3. In automation, Create a scheduled job with a JQL condition matching what you want. The Action should be "Publish Event" with your custom event type.

So the automation will run on its schedule, come up with the list of issues, and for each one fire/publish the "Coming Due Soon" event, which will trigger an email to the user listed in the custom field.

 

If you end up getting the full version of automation, you will have options to use the send email or comment on issue action. and you can look at using "Smart Values" to get the user information to email as well as customize the email more.

 

(note I am assuming Server version since you didn't say cloud. If you are using cloud then you have access to comment and email, but not publish event, so then this doesn't apply.)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

275 views 1 2
Join discussion

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