The team would set the "Due Date" field and status to recurring for specific issue type tickets. An automation would notify on quarterly basis every year that the report is due in 30 days.
Take for example, ABC-123 issue type with the "Due Date" is Oct 17 2014 and status equals recurring is currently set by the team. Note that the due date can be from the past date or in the future date as well and now it would be beneficial to be alerted on September 17th, December 18th, March 18th, and June 17th every year that the report is due in 30 days.
I have no luck in setting this up in JIRA Data Center Automation Rules and wanted to understand if this doable? Any suggestions with precise steps or screenshots will be greatly helpful.
Thanks @Kalyan Sattaluri . It was my bad, as it is due to a typo. The days result is now displaying.
Awesome. Now I need some time to think through the logic to implement.. Basically I am thinking of doing brute force if checks on the date but need some time to think it through... I will update the post once I think through few scenarios..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like, we're getting close.
Applied the change that you have recommended and looks like that did the trick. I tried a few changes on the last component in the Automation Rule but the diff value is still failing.
FYI - Date Needed By custom field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello, i am going to continue posting in other comment so discussion is together for future reference..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @VVC
At a high level, requirements like these are solvable, so thats the good news... but we need details on what to do and how to solve.
For example, What is the field which hold if an issue is "recurring" or not?
Also quarterly, is it per calendar basis or based on due date?
So, take the example you have given of Due date as Oct 17 2014, when is the next notification you expect to see?
Please think through this example's specifics and share details around it, else we cannot provide suggestions.
Also, Please share what you have so far so community can help..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kalyan Sattaluri
Thanks for looking into my question and I will try answering your questions.
1) Condition: Issue status = recurring and "due date" = 30d
2) Notification to be sent Quarterly based on the due date field that is already set on the ticket and when it is due in 30 days
3) There are a bunch of tickets with recurring status and due date published with either a past or a future date.
4) Automation should be able to trace each ticket with the ststus field set to recurring and when it is due in 30 days then trigger an email notification to the team on quarterly basis every year.
For example, ABC-123 ticket has a due date set to a past date as Oct 17, 2014. So the notification should trigger quarterly like starting on September 17th 2024, December 18th 2024, March 18th 2025, and June 17th 2025, September 17th 2025, December 18th 2025 and continue every year until that ticket is moved out of recurring in the status field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
TY @VVC
I think I understand requirement now.
Can I suggest below steps to know if our approach will work. We will test will an issue for now to check syntax and we can set up recurring schedule afterwards. Start with:
Below is the explanation:
If we can get the fifth step to get you the days, then we can check if this diff is 30 or 120 or 210 days and if so, we can send email...
if above works, you will check your Trigger JQL to run daily and JQL => status = recurring
Hope it helps, please try and share your feedback, screenshots of your rule/audit log will help. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, I havent fully thought through the If conditions on when to send notifications, that is should be 30/120/210 or what... but please go upto step 5 to get the diff.
And we can evaluate correct logic tomorrow when we can think deeply. sorry have to rush now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, This is strange. I tried the same with a date field I have (Target start) and as you can see further below in the screenshot, I am getting the "formatted" output correctly.
Couple of suggestions:
Just FYI. If you dont know how to find a customfield value,
If none of the above works, we need to get heavy hitter SME's in here to help us find alternative ways.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am guessingv below syntax worked to reformat the date?
{{now.format("YYYY")}}-{{Date Needed By.format("MM-dd")}}
If so, assign it to variable -- newDueDate
And then log a statement: {{now.diff(newDueDate.toDate).days}} like I have in my screenshot.
Please share screenshot of the rule&audit log together so we can evaluate if any issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @VVC and @Kalyan Sattaluri
Rather than building the date up as text, have you considered using the withYear() function to change the year to what is needed: https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html#Jirasmartvaluesdateandtime-withYearwithYear
The value from the current year could be extracted from now to pass the parameter.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Bill Sheboy and @Kalyan Sattaluri
How exactly is the syntax going to change for the below line with reference to {{now.withYear(1979)}} ?
{{now.format("YYYY")}}-{{Date Needed By.format("MM-dd")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
TY @Bill Sheboy , I honestly was not aware of that function. Am taking a look at how we can use it.
But, for the use case of @VVC - which was,
"ABC-123 ticket has a due date set to a past date as Oct 17, 2014. So the notification should trigger on:
and continue every year until that ticket is moved out of recurring in the status field."
I interpreted the requirement as: "Based on a Date field in an issue, send notification 30 days before every quarter, where quarter is just in 90 day intervals from the date on the issue"..
So, I was thinking of below approach:
And we just got past step 1, trying to do step 2.
Can you please share if you can think of another/cleaner approach.
@VVC - Please do the diff step mentioned earlier, share screenshot of rule/audit log in the meantime.. I am curious why your diff is not working :p
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the issue field's smart value is Date Needed By, and it is a date field, this would do it:
{{issue.Date Needed By.withYear(now.format("YYYY").asNumber)}}
If you need that in jiraDate, text format, please add that to the end:
{{issue.Date Needed By.withYear(now.format("YYYY").asNumber).jiraDate}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @VVC
Apologies it took me sometime to get back to this thread. Been kinda busy. If you have solved the problem, please share, else here is the logic I think we can implement to build upon where we are so far..
We will use If/Else conditions for this. So after your last step, do:
Explanation:
Below is the screenshot. Can you think about the logic I am suggesting and see if it meets the requirement. You can adjust the dates, I assumed a quarter as 90 days and we need to send notification 30 days before., so the 30/120/210/300
Also, When you get a chance, can you replicate the rule with log statements and put in due date which gives us values which enter appropriate if blocks and if its giving you data..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kalyan Sattaluri
Please don't apologize, as I really appreciate your favor in sharing this automation implementation logic here. Based on your proposed automation, it looks like this is promising in theory but please allow sometime for me to implement in my system and keep you updated. Thanks again for your time and knowledge sharing on this one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now that I am thinking about it, there is a flaw in the # of days I am checking in earlier logic when due date is in the past.
Since I am struggling to come up with clean approach, I want to get you a working solution first, so I propose, we ditch everything we did up until now. and start fresh.
We will just hard code these intervals for past due date and get this rule done.
So please start a brand new rule and make your rule like below screenshot.
You need 2 if conditions:
First checks if due date is in future and difference is 30 days out,
Else checks if due date is in past and difference is one of: (spaced by 90 days)
60|150|240|330|420|510|600|690|780|870|960|1050|1140|1230|1320|1410|1500|1590|1680|1770|1860
So considering today,
Date Needed By |
3/14/2024 |
12/15/2023 |
9/16/2023 |
6/18/2023 |
3/20/2023 |
12/20/2022 |
9/21/2022 |
6/23/2022 |
3/25/2022 |
12/25/2021 |
9/26/2021 |
6/28/2021 |
3/30/2021 |
12/30/2020 |
10/1/2020 |
7/3/2020 |
4/4/2020 |
1/5/2020 |
10/7/2019 |
7/9/2019 |
4/10/2019 |
Its simple, we are not overthinking this, you can just add these past intervals for say 10 years and it should be good.
In the mean time, I will also see how else to solve this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Kalyan Sattaluri for running some extended thoughts again in trying to simply the solution. I wonder that hardcoding dates might not work in our scenario, as there are multiple issue type tickets with recurring status and various due dates for each ticket set in the "Date Needed By" custom field, unless I'm not getting this correctly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @VVC
Does not matter what the date is set to. Criteria is still the same.
Your rule will look like:
So every day, rule will run, it will find issues based on above JQL, and based on today's date, check if notifications need to be sent and if so.. you will send.
The table I gave is for you to test the rule to simulate that if we ran above rule today, it should pick up all these issues which meet the criteria of the dates listed.. thats all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sounds like a plan, Thanks @Kalyan Sattaluri . I will implement the automation steps sometime in this week and then let you know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kalyan Sattaluri
We are currently validating the results of this implemented solution in one of our staging instance, so I will keep you informed on how it is working for us.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kalyan Sattaluri
Our Ops team are still validating the reminder notifications for bunch of tickets that was triggered using this automation, so this may take some more time to receive their feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kalyan Sattaluri -This is taking much longer than expected for our team to validate the automated notifications for bunch of tickets, so I will plan to tackle any inconsistencies at a later time whenever they're all ready. I really appreciate again for your superb assistance with this automation build.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.