Forums

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

Create Due Dates based on a set schedule in automation

Anthony Roldan July 28, 2023

Hi all. I would like to create a due date based on a set date starting on 2023-08-02, and then it updates to plus 3 weeks, so the next due date starting the day after will be on 2023-08-23. I'm using automation to set up task due dates, so this would have to happen dynamically without much human intervention. I've tried setting up a calendar to iterate through the dates and compare them to {{now}}, but I couldn't find a way to implement a "for loop" of sorts. I thought advanced branching would be the solution but I couldn't figure it out. If anyone can help me out with this I would be very grateful, thanks!

3 answers

1 accepted

2 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2023

Hi @Anthony Roldan 

Other than a case of a one-time-usage rule, I am unclear how this would work long term.  Wouldn't the "starting point" need to change over time?

Regardless...

A few ways to do what you ask are: created variables, an "anchor story", and entity properties:

  • With a created variable saving your start date as text, it can be converted to a date and then incremented.  Or...
  • Create an "anchor story", which you leave in the backlog.  Find this story with JQL and load it with the Lookup Issues Action.  The fields in that story could then be used in other issue creation / update actions.
  • Store the starting date in an entity property for the project, and use the REST API (called from the rule) to get / update it when needed.

Kind regards,
Bill

Anthony Roldan July 28, 2023

Yeah the starting point will likely change at some point in the future, but for now this is a good solution. I've set an anchor point, and from there I'll do a JQL lookup to use that date with {{lookupIssues}}. Every 3 weeks the anchor story will get another 3 weeks added with an automated JQL rule using {{lookupIssues.date.plusWeeks(3)}}

Thanks for the help!

Like Bill Sheboy likes this
0 votes
Ste Wright
Community Champion
July 28, 2023

Hi @Anthony Roldan 

I think @Bill Sheboy has the most suitable answer, but thought I'd ask questions in case there was a more dynamic option...

  • How does the starting date get generated - i.e 02/08/2023? Is this dynamically or is it a static starting point?
  • What are the other parameters of this rule? Is Automation creating multiple Tasks all with 3 week separated due dates? Or is it simply for every next issue created?

Ste

Anthony Roldan July 29, 2023

Thanks for the interest! To answer your questions:

 

  1. Yes, we have an internal calendar set in stone, so the starting point would be static.
  2. We have different tasks created through automation with dynamic due dates (so they would have something like {{now.plusBusinessDays(2)}} ), but some of these tasks are due on a set date every 3 weeks. So those tasks created before 02/08/2023 are due 02/08/2023. After this date, the new due date would be 3 weeks in the future, so 02/08/2023. Repeat ad nauseam for the rest of the year, until we get a new schedule next year. From there we'll once again set a new starting date, and again advance the due date every 3 weeks. Hopefully that was clear, apologies in advance if it wasn't.
0 votes
Sayed Bares [ServiceRocket]
Community Champion
July 28, 2023

@Anthony Roldan you can try using this smart value and it should work:

{{now.plusWeeks(3)}}
Anthony Roldan July 28, 2023

The thing is that these due dates are based off of a set calendar, so in the example with the due date 2023-08-02, {{now.plusWeeks(3)}} won't work.

Once we approach this date, the next date should advance 3 weeks, so 2023-08-23.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events