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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,251
Community Members
 
Community Events
184
Community Groups

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

0 votes
Yvan Martin
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.
Jun 20, 2019 • edited

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.

Yvan Martin
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.
Jun 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

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
AUG Leaders

Atlassian Community Events