Forums

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

Create an automation rule for due date and start date

Silvia Fattori
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 29, 2020

Is it possible to create an automation rule that assigns to the due date of a story the due date valor most future present among all the present issues of that project?

Then I would like to do the same thing with the start date, taking the most recent date present.

 

For example

domanda community.PNG

 

Thank you 

 

2 answers

1 vote
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.
October 29, 2020

Hi @Silvia Fattori  -- Welcome to the Atlassian Community!

You probably can do that using the list and math functions.  It may require the use of a temp variable (create variable or custom field) to retain the value.

And, the techniques would be different if you are using sub-tasks versus the other issue types, as sub-tasks are already a list and you could find the maximum date immediately: {{issue.subtasks.Due date.max}}

What have you tried thus far to do this?


Best regards,

Bill

Silvia Fattori
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 30, 2020

Thank you for your quick response.

My search for two max dates should be done on all types of issues in the project (so not only subtask). I would need to know how to put it in the automations.

domanda community2.PNG

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.
October 30, 2020

Hi @Silvia Fattori 

For more details, here is an example to set the Due Date for a specific Epic...

  • Trigger: Due Date is changed
  • Condition: related issue, check this issue has an Epic
  • Branch: on the Epic (Parent) of this issue
    • Condition: if the story Due Date {{triggerIssue.dueDate}} is greater than the parent Epic Due Date {{issue.dueDate}}
      • Action: set the epic's Due Date to the value from the triggerIssue Due Date

If you wanted to check a Due Date spanning all issues in a project you could use a created variable and iterate using a different branch JQL filter...but, you will need to pick an issue to store the maximum value into, such as a specific Epic.

__Bill

Like # people like this
0 votes
David Ashlock
Contributor
March 2, 2022

Hi @Silvia Fattori , this can be done with the {{lookupissues.Due date.max}} and {{lookupissues.Start date.min}} smart value functions.  See attached.

 

Screen Shot 2022-03-02 at 5.07.03 PM.png

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.
March 2, 2022

Yes, indeed.  Those fields did not exist in Lookup Issues when this question was first posted, so the solution is now easier to implement.

David Ashlock
Contributor
March 2, 2022

Haha!  I figured so or you would have suggested it.

 

@Bill Sheboy i was actually looking for a way to specifically ask you if you can do the following:

{{lookupissues.Due date.max.diff(issue.Start date).businessDays}}

 

I believe you can, but I'm having an issue getting the max due date to come through (separate issue).

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.
March 2, 2022

Hi @David Ashlock 

Yup, and I believe you just have a couple of smart value capitalization and spacing issues...this worked for me:

{{lookupIssues.duedate.max.diff(issue.Start date).businessDays}}

Kind regards,
Bill

Like David Ashlock likes this
David Ashlock
Contributor
March 2, 2022

@Bill Sheboy 

 

Thank you!

 

One follow-up question -- if your lookupIssues only has a single value, does the .max function still work?  When I removed that, everything worked -- note that there is only one issue blocking my test issue, but there could be more in the future.

David Ashlock
Contributor
March 2, 2022

@Bill Sheboy 

I think you can ignore this question -- the capitalization and space issues seem to have fixed that problem as well -- never realized it was going to be that picky!

 

Thanks again!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events