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
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
I'm trying to make automation that will choose earliest date from child ticket (start date field) and copy it to Parent ticket start date.
For instance Parent “Start Date“ = 01.02.2020, Child “Start Date“ = 01.01.2020, Child “Start Date“ = 01.03.2020 → Parent “Start Date“ = 01.01.2020.
I've created automation that collecting date from Child and adding to Parent, but it collect just any date, now it needs to be earliest date.
If anyone knows some JSON formula or Smart value and wants to share, that would be appreciated. Thank you in advance.
Current automation looks like this:
To confirm the problem you are trying to solve...you only want the Parent to change to the earlier date if a Child issue has one. Is that correct?
If so, couldn't you change your advanced compare condition in the branch to:
If instead you need the earliest date among all child issues, consider using Lookup Issues instead with JQL. That will handle the case of an issue changing parent when the dates do not change...and that may required a couple of rules with different triggers: field value changed for Start Date, and issue updated for a change in parent (both the incoming and outgoing parents could need updates).
I would need to play with the rule (and if I get some time today I will) but I would approach this way...
update the parent date if empty or if it is > the date in the child issue that triggered the event using the following smartvalue context
Compares date1 to date2, to find which date is earlier. Returns:
-1, if date1 is earlier than date2
1, if date2 is earlier than date1
0, if the two dates are the same
//returns -1 or 1