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?
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
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.
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.
Thanks for the additional details. I wonder if there are actually multiple issues here:
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.
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events