Automation with a scheduled trigger
Asked by Arlene OConnor:

So, I was tasked with creating something that would automatically send an email to all staff on a specific date (tied to a custom field completed in a form). Originally I had it triggered to occur when the status changed to "Approved" but I couldn't get it to function only at a certain time. I thought it was related to the timezone setting of the tickets vs the automation but when I checked, our settings were set to our current time zone. Ideally, someone could fill out the necessary information and have it waiting to trigger on the specific date. I could only get it to work when the form was completed on the same day as the date the email needed to be sent out.

I added on the Scheduled trigger to see if perhaps I could make it look everyday for any tickets that met that parameter.

I hope this made sense,

![Capture.JPG](/t5/image/serverpage/image-id/320677iFAD8B239FCAC9953/image-size/large?v=v2&px=999 "Capture.JPG")


Answers:
author: John Funk
body: Hi Arlene,

So is that working now?

Also, you don't need the Re-fetch in this instance.

comments: author: Arlene OConnor
body: Sadly no, I'm trying to run some timing tests to figure out of maybe I was wrong about the timezone alignments but it isn't triggering the automation. That's why I added the scheduling trigger on it, to make it check everyday.


author: John Funk
body: So, what exactly is your use case/scenario that you are trying to achieve?


author: Arlene OConnor
body: So, we have been manually sending internal email notifications of upcoming software releases. This task has mostly fallen on me, though most of the releases are managed by other PMs. My supervisor tasked me with creating a Jira Project that would automate the process by using a form that could be filled in and then reviewed by marketing before being submitted to the company. What I'm trying to do with that automation is that after the ticket has been reviewed and marked "approved", then on the appointed date (field in the form), it would submit the email to the user group assigned.

In testing, I've found that if the field's date matches the current date, the automation and email go off without a hitch; however, if the field is set for another date, it will not trigger when that date occurs. I would prefer to do it after 10 a.m., but if I can get the date part working, I would be happy with that.

I think that I might have to make it into two separate automation systems. Once that says the email is ready to send, and the other that actually triggers it. I think that since "Send Email" is a DONE category, the system won't recognize it when it does the scheduling


author: John Funk
body: Okay, I don't think I am following it still.

Why but all of those conditions in a JQL in the Scheduled trigger itself? It's probably the NOW that is giving you problems. Maybe try:

Project = ABC AND Status = Approved AND SRC-EmailDate,= startOfDay()

Run that as a filter/query and see if it returns what you expect.


author: Arlene OConnor
body: I found a workaround fix, but thank you!


author: John Funk
body: Can you share your workaround?


Tags: cloud

jira-service-management

jira-service-management-cloud