Set Epic dates according to the earliest Story Start Date and latest Story Due Date

Ayelet Ben-Tzur January 25, 2021

Hello Community!

The need is to set dates on the Epic that starts on the earliest Story Start Date, and end on the latest Story Due Date, using Automation.

As I see it, I need the rule to run over all the Stories in the Epic and extract the correct dates, coping them to the Epic dates. 

How can this be achieved?

 

1 answer

0 votes
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.
January 25, 2021

Hi @Ayelet Ben-Tzur 

I am guessing you mean in an automation rule.  If not, please disregard my suggestion below.

How about turning this inside out rather than looping over the epic's issues?  That is, whenever an issue's Epic Link, Start Date, or Due Date change, check and update the parent as needed.  This will take three rules for a complete solution, such as:

Rule 1 (due date changes): You can copy/modify this example from the library

https://www.atlassian.com/software/jira/automation-template-library/rules#/rule/1357113

Rule 2 (start date changes): You may use the same example above, except replace with start date

Rule 3 (epic link changes): Same as above, changing the trigger and logic to include updating both fields.

Best regards,

Bill

Ayelet Ben-Tzur January 25, 2021

Thank you Bill, that is actually similar to what I implemented, but there is a problem:

I have 2 stories, and the earliest start date for example is Jan 18. This date was copied to the Epic, and now the Epic will start on Jan 18. So far - great. 

Now - I'm changing the start date of the story to Jan 20. This won't be copied to the Epic since the rule copies the date only if it is earlier than the existing date.

So now I have an Epic that starts on Jan 18 when no Story starts on Jan 18.

Any ideas?

Thank you!

Ayelet

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.
January 26, 2021

Hi @Ayelet Ben-Tzur 

Thanks for the additional details.  I wonder if there are actually multiple issues here:

  • You want the epic updated with the most recent information on start/due dates
  • The epic is composed of multiple stories, any one of which could start at different time frames than the overall range of epic timeframe
  • You want to update stories and have them update the epic (and possibly all of the sibling stories as well)

You could write a rule which syncs up and down (one story up to epic, and epic down to sibling stories), and I expect that would run into problems.  There is no guarantee of the execution order of rules or even the components within a rule; they run asynchronously.  Any up/down rule might lead to collisions or run-away execution.

The safest choice here is probably to always manually update Start Date and Due Date in the epic, and use one rule to sync down.  Or, accept the stories are out of sync and only the latest change *wins* in updating the epic.

Best regards,

Bill

Ayelet Ben-Tzur January 26, 2021

Thank you Bill!

Actually - the sync is relevant only up - dates of the stories affect the dates of the epic.

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events