Hello team,
I created an automation for when I add a date in the ''approved test'' automatically the field ''refresh test'' change to 15 days later and it works correctly, now, I want to add that based on the date (the 15 days later) that day I get an email notification and I would like to add in addition to that some conditional that if before that time the ticket changes to status ''finished'' no notification is sent. What would be the best way to do it?
Here's the way that I was trying to make it:
thanks
Hello @Felipe Motta
Welcome to the Atlassian community.
You can't add the email reminder activity to the same rule. The rule you have is triggered by a change to the approved test field. It will attempt to send the email the same day the rule is triggered. There is no method available within a rule to tell the rule to schedule an email to be sent later.
You need a separate rule concerning to send the email.
I recommend that you use a Schedule trigger for the second rule. You can set it up to run daily and execute a JQL to find all the issues where the the "refresh test" date is the same day and the issue is not in the "finished" status:
"refresh test" is not empty and "refresh date" = now.jiraDate and status!="finished"
Then add an action to Send Email. This will execute for each issue found by the JQL in the trigger.
@Trudy Claspill Thanks for the explanation! Is there any article to create this schedule trigger that you mentioned me or you can guide me on how it looks like a similar automatization? If the ''refresh date'' is not empty system will take the date or how I configure it to choose the date to send the email?
About the conditional If I change the ''status'' to approved/finish, is there any way to don't send the email?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For future reference, when you go to the Automation page there is a tab for Templates. You can look there for examples.
Additionally on that same page is a link to an online area that has more templates:
You can also refer to the documentation on the features of Automation Rules:
https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/
And lastly, there is free, on-demand training available at Atlassian University. Here is an example search for courses related to the Jira Automation feature:
https://university.atlassian.com/student/catalog/list?search=jira+automation
Here is an example of a rule that could work.
The JQL used in the schedule trigger is
"refresh test" is not empty and "refresh test" >= startOfDay() and "refresh test" <= endOfDay() and status != "finished"
You can build out that JQL in the Search for Issues screen to confirm you have specified the field names and Status value correctly.
That will return all issues where "refresh date" is the same day that the rule runs, and the status of the issue at that time is not "finished"
Make sure that you uncheck the box below the JQL. With it check the rule would process only issues that had some update since the last time the rule ran.
Then you add an action to send the email. An email will be sent for each issue found by the JQL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Thank you so much!
Just las thing, I was trying to create the JQL but got an error message:
tried to change the names to spanish but got the same error, this is the field:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the Search Issues screen to create that part of the filter. You can start in the Basic view:
Pull down the Status field. Select the value from the list.
Then switch the the JQL view and add the "!" character so that the criteria is "not equal" instead of "equal"
That will give you the valid JQL syntax for the Status criteria.
If that doesn't resolve your issue, please provide a screen image (or copy the text) of your entire JQL statement and share it with us.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Thanks!
I already set up the automatization and leave with 1 day to test, however, I don't receive the notification, could you please help me letting me know If I did something wrong?
This is the JQL: "refresh test" is not empty and "refresh test" >= startOfDay(1) and "refresh test" <= endOfDay(1) and status != "Done"
This is the search issues screen to double check: ticket (FOKI-22)
And this is the refresh test date January 3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please provide screen images that show
1. your entire automation
2. the details of each step in the automation rule
3. the output in the Audit Log for when the rule executes.
4. the information in the Rule Details page
5. The details of an issue for which you think you should've gotten an email
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.
The log is indicating that there are no issues being found that match the JQL in your trigger.
What is the complete JQL that you have used in your Scheduled trigger?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This one: "refresh test" is not empty and "refresh test" >= startOfDay(1) and "refresh test" <= endOfDay(1) and status != "Done"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You said
I want to add that based on the date (the 15 days later) that day I get an email notification
When exactly do you want to get the notification compared to the date specified in "refresh test"? Do you want to get it on that same date? Do you want to get it some number of days before that date? Do you want to get a reminder if that date is in the past?
In the example I provided I had no number in the parentheses for startOfDay() and endOfDay() which would result in the email being sent on only the same date as "refresh test"
When you use startOfDay(1) and endOfDay(1) you are telling Jira you want to compare against "start of today plus one day" (i.e. tomorrow's date) and " end of today plus one day" (i.e. tomorrow's date.
Looking at the audit log the rule ran on
4 January
5 January
6 January
The "refresh test" date in the issue you showed 3 January.
3 January is not "tomorrow" relative to any of the dates on which the rule ran.
When it ran on 4 January it would've selected issues with a "refresh test" date of 5 January.
When it ran on 5 January it would've selected issues with a "refresh test" date of 6 January.
When it ran on 6 January it would've selected issues with a "refresh test" date of 7 January.
When you specify when you want to actually receive the notification, I can offer a suggestion about how to change your JQL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the explanation.
When I fill in the ''refresh test'' field with a date, e.g.: January 1, 2025 I want to receive an email notification in the next 15 days January 16, 2025 (maintaining the status != "Done).
What would be the suggestion?
The reason why I added 1 day was just for test purpose to don't wait until 15 to see if I receive the email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that clarification!
The JQL you would need for that is
"refresh test" is not empty and "refresh test" >= startOfDay(-15) and "refresh test" <= endOfDay(-15) and status != "Done"
When that rule runs, it will select issues where the "refresh test" date is exactly 15 days in the past.
Using a negative number in the parentheses tells Jira to subtract that number of days from startOfDay() and endOfDay(). If the rule runs on 16 January, it would select the issues where "refresh test" is 1 January (16 minus 15 equals 1).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ouh! Makes sense!
I will make a test with -1 just to doublecheck and if something additional shows up. I'll be back
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great!
And if you ultimately find that my responses have helped you solve your problem, please consider clicking the Accept Answer button at the top of the response thread. That will mark your question as Solved which helps others searching the community find posts with validated solutions.
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.
@Trudy Claspill Sorry to bother you again,
I use te same automation in another project and I'm getting the next error message ''Unable to use the provided JQL'' the only different thing is that the field it is not called ''refresher test'' but is called ''follow up'' and also trying to add 2 status ''approved'' and ''rejected''
The JQL used: "follow up" is not empty and "follow up" >= startOfDay(-1) and "follow up" <= endOfDay(-1) and status != "Approved"
At the moment didn't add the ''Rejected'' status because I don't know how to connect it.
Could you please help me?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Felipe,
As I mentioned before, you should use the Issue search screen to work out the proper JQL syntax.
Try to put the same JQL into the issue search screen to see if it is valid. Get to that screen by going to the Filters menu and selecting View All Issues. You may have to change the query building method from Basic to JQL if that option is not already selected.
If you are unfamiliar with how to build queries with JQL, I recommend that you start by using the Basic interface. There it provides pull-down fields to help you build up your query. You can then switch the the JQL interface to see how that looks in JQL. Not everything that can be done in JQL can be done in the Basic view.
You can search for fields to add:
After selecting it, Jira will give you some prompts for criteria and/or values to select.
Some fields, like Status, are already available.
For that field, check the boxes for all the status values you want to include.
Then switch to the JQL view to see what that looks like in JQL.
You can find documentation about how to create filters here:
https://support.atlassian.com/jira-software-cloud/docs/search-for-issues-in-jira/
You can find free, on-demand training on the topic at the Atlassian University site.
https://university.atlassian.com/student/catalog/list?search=jira+filter
If you are new to Jira, I strongly recommend that you take advantage of the free training to get better acquainted with the product. There are a variety of beginner level courses you can start with, and then proceed on to the intermediate and advanced level courses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.
Learn moreOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.