Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with formatting Automatic Due Date setting and search query

Ciara_Shearin July 5, 2023

Hi Everyone!

I have two related automation questions I need help on. (Data Center, no screenshots available...apologies in advance).

First: When an issue is created, a due date is automatically populated. That due date is the end of the month of the following year. For example, if it's created on 2 Jul 2023, the due date will be 31 Jul 2024.

Automation I have right now: 

When issue created, if issue type equals x and (this field is checked yes), then edit issue field Due Date {{issue.event date.endOfMonth.Plusdays(365)}}

Second automation would be having JIRA do a search every 28 days of issue type x, where this field is checked yes, and the due date is within 31 days. (basically next month). For example, if my issue was due 31 Aug 2023, I would get an email early-mid July saying my issue was coming due at the end of 31 Aug 2023. 

I have no idea where to start with that. So any help would be appreciated. 

Thank you!

Ciara

 

1 answer

1 accepted

0 votes
Answer accepted
John Funk
Community Champion
July 5, 2023

Hi Ciara - Welcome to the Atlassian Community!

Have you tried creating either rule? For the first rule, is it running? Is there an error or problem with it?

For the second rule, create a rule with a Scheduled Trigger. In the trigger add JQL to check the due date.

Then add a new action for Send Email and place the information in the fields. 

Give that a try and then post your rule for any needed help. 

Ciara_Shearin July 11, 2023

Hi John! Sorry it's taken me a while to get back to you. The first rule works great, except one or two dates aren't exactly at the end of the month. I think the 2024 leap year has something to do with that, they are off by one day? Do you know how the automation handles leap year? 

I will work on the second one this week, and if i have problems get back to you.

Like John Funk likes this
John Funk
Community Champion
July 12, 2023

Instead of using 365 days, I would use 12 months. 

Ciara_Shearin July 13, 2023

Thanks! That works...I don't know why I chose days instead of months. 

John Funk
Community Champion
July 13, 2023

Great! Glad that worked for you.

John Funk
Community Champion
July 13, 2023

Would you be so kind to click the Accept Answer button above so we can close this one out? Thanks!

Like Ciara_Shearin likes this

Suggest an answer

Log in or Sign up to answer