Can I run a rule manually (or schedule) to update all Epics based on Story data with automation?

Dan Bish June 20, 2019

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.

Cheers,

Dan

1 answer

0 votes
Deleted user June 20, 2019

Hi Dan,

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.

 

Screen Shot 2019-06-21 at 1.01.53 pm.pnghttps://docs.automationforjira.com/working-with-issue-data/date-functions.html#manipulating-dates

 

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.

Deleted user June 20, 2019

If you are require further support in getting your rule to work, you can contact support here: https://codebarrel.atlassian.net/servicedesk/customer/portal/1

Dan Bish July 5, 2019

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.

Dan

Rory Standley June 23, 2021

I would be interested in seeing the steps if you wouldn't mind?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events