What I am trying to do is run a rule that can capture all Epics and look at their child/linked stories for the duedate. As I go through each child I want to compare it against the Epic and update the Epic duedate if the story duedate is greater than the parent Epic's duedate.
Of course I would like to be able to do this with one rule if possible. The problem I have been facing is that the rules I have created do not give me the ability to capture the information and essentially loop through each of the results causing an action.
I would suggest creating this rule by listening to field value changes for due date on stories. This won't run on existing stories with due dates but will work on any new updates. I've created a sample rule to do that in the screenshot below. Somethings to note, is we actually use the epic branch rather than the other way around since we can currently only edit issues in the current branch, instead of the trigger issue. Also the reason I use |-1 in the comparison is that compareTo function won't return properly if the epic's due date is empty.
It's also possible to run this on a schedule by changing the trigger to scheduled and coming up with some JQL to find stories. Possibly something such as issueType = "Story" and duedate is not EMPTY and updated >= -1d. Of course you could remove the updated check but then you'll run through every story which could be quite costly.
Good news, I figured out a few ways to do this. My final solution was a scheduled trigger followed by JQL so that the JQL would return broader sets than a simple trigger. Once I have the larger set at the story level, I can run through the "current issue branch rule" (this is the key part to the loop) and add logical steps for the Epic Parent and update as needed.
Thanks for your suggestions, I will have to come back and add some screen shots to show how it works.
Hello Community! Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...
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