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

Schedule a custom email to send based on a custom date

Our HR team uses JIRA functions and would like see if it's possible to send out an email containing a survey link to a new hire exactly 7 days and 90 days after the hire date?  In this case, I've got 2 custom fields setup: Employee Start Date and Email Address.  So if an employee with an email address of "abc@domain.com" who starts on 1/1/2016, we'd like this employee to get an email on 1/8/2016 and 4/1/2016.

I've looked into using subscription (less preferred since it only sends out issues and not custom email) and using Jelly as a service, but can't quite figure out how the JQL filter would look like and how to modify this Jelly Escalation script to fit the requirements.

First post and any insights would be appreciated!

2 answers

1 accepted

1 vote
Answer accepted

Hi,

Unfortunately, JETI does not have built-in support for scheduled emails (it will come though in this summer).

However the JIRA Automation Plugin (free) may help you. It is able to fire events for issues matching a certain JQL query.

If you can phrase the JQL query to return the issues that are due to be sent, schedule this in the automation plugin and configure it with the Fire Event action.

The action should fire a custom event (e.g. Notify Employee). Then configure JETI to send event notifications to the employee or recipients using your custom email templates when this event is fired.

Tibor

 

Hi Tibor.

Thank you for the answer!  That's fine if this is something that's on the roadmap.  I've been pleased with the functionality and would rather use one plugin to manage all custom emails than another plugin.  I'll create two filter subscriptions for the time being to send reminders for HR to manually send the surveys and automate the process when the feature is live.  Keep up the great work!

Did this functionality every make it in? Can't find anything about it in the documentation... 

Hi

It is indeed possible to have JIRA send an email (using a special format) by the use of a number of different plugins. JETI, ScriptRunner4JIRA and others are all possibilities. Each comes with its own pros and cons. 

To look at your problem and how to solve it I would actually break it down as follows

  1. Detect the set of issues (new starters) who have been with the company more than 7 days and have NOT received the new hire 7 day email.
    JQL: startdate <= -7d AND email_sent = "None"
    Send email and update email_sent field to "7 days"
  2. Once this email has gone we then wait until the next trigger point which can either be 
    1. reset the email_sent field to "None" to resend this would be useful for example where an email address is updated due to a misspelling.
    2. or 90 days have passed
  3. If the 90 days have passed this gets picked up by the following
    JQL: startdate <= -90d  and email_sent = "7 days"

By using a field to track which emails have been sent (email_sent in above examples) you are able to control which emails go when. Also allows the resetting of the value to cause an email to be resent where appropriate.

 

Hey Phill!  Thanks for the answer, first of all.  We're actually evaluating JETI right now and I've already created a few custom templates to go with the other HR functions and it'd be nice if I could accomplish this using the same plug in.

Your suggestion makes sense and I have a few questions:

  • Is Email_Sent a custom field that I should create to check on email delivery?
  • I'm unsure how JETI works in terms of a custom field update. How can I configure it so that the system updates email_sent to "7 days" after an email has fired?  One Event Type I think may work is "Generic Event", but unsure how JETI refreshes to check against the startdate in JIRA.
  • Is there anything that needs to be done on the work flow level or all from JETI?

For starter, I was planning on using the following JQL to filter out the issues:

“project = IT AND "Employment Start Date" = endOfDay(-7d)”
“project = IT AND "Employment Start Date" = endOfDay(-90d)”

These filtered out what I needed, but doesn't check to see if the employees got an email already, so it's less desirable.  Would appreciate any other input you may have!

Phil -

Thanks for answering this by the way.  See my response to Tibor (JETI plug-in creator) for my resolution for now - appreciate the response smile

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

34 views 0 1
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