Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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.

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

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

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

🤺 Atlympic Event: Partnerships

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! ...

111 views 0 6
Read article

Community Events

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

Events near you