You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hey,
I want to trigger a listener each time an epic is updated, specifically when a story is added to the epic via the "epic link" field.
(The end goal is to fill a "bigger sprint" field based on the stories' biggest sprint within the epic).
Seems like setting the epic link of a story does update the "updated date" of the parent epic but for some reason, this does not trigger the listener.
Any way to work around that? Am I doing something wrong?
For know the workaround I do is to basically empty the field on a scheduled basis, which of course completely clutters the issue history.
Thanks.
This is an annoying one, but something that makes sense if you look at it from the point of view of the people who are given a story to implement in Jira, without fully understanding the wider picture.
Listeners work off events, and "issue updated" events are only fired by changes to issues. When they are, the event contains a pointer to the issue that has been changed.
Now, in this case, when you are updating links, you are only changing the child issue - the Epic link only exists on the child. Despite the fact that the Epic effectively gets updated as well, there's not technically any change to the Epic, so no event is fired.
The change of updated date on Epics when they gained or lost stories was a "nice to have" feature that Atlassian implemented ages ago (there was a time when adding issues to an Epic appeared to have no effect on the Epic at all), but it was done in a minimal way, without looking at the actual problem it should have been solving - i.e. exactly what you've got here!
What you should do is create a listener that listens for the child issues having an Epic link set, and read that as the trigger for the rest of your script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.