Hi, My JQL skills are not so good but I need help on creating an automation for:
1. A custom created field called milestone
2. I have linked tasks and sub-milestones using 'a child of' relation to the 'is parent of ' milestone
Automation rule:
1. Update 'is parent of'linked issue due date when
2. 'is Child of' linked issue due date is greater than 'isparentof' due date
AND
'ischildof' due date is maximum among the linked children due dates
Hi @Praveen Ravichandran -- Welcome to the Atlassian Community!
First thing, I recommend not using the Multiple Issue Events trigger for this scenario. There are recent defects where the rule could run multiple times for the same change. Instead, create at least two different rules with different triggers: Issue Created and Field Value Changed for your specific field.
Next, changing the trigger will help with a different problem: your current rule would run for every issue change, but it should only run when the specific date field changes.
Next, you are using issue links for the relationships between the issues, and then trying to find the maximum date for the "child" issues. Branching to check each linked issue could create timing / update problems.
Instead, I recommend identifying the "parent" issue to update with JQL, and then branching to just that issue. Then use the Lookup Issues action with JQL to find the "child" issues. With that, the maximum date value can be easily found to perform a single update of the "parent".
Finally, scenarios to sync a field between "parent" and "child" issues have lots of possible cases. Please consider which cases you want to handle as that will help decide how many rules are needed. You have have only noted a couple of cases. Here are some of the other ones:
Kind regards,
Bill
Hi Bill, thanks for your answer
1. Can you give me a rule snapshot in response to mine with the corrections you suggest?
2. JIRA has limitations on hierarchies that can be established. eg: custom field Milestone only has an option to add subtask where I would like to add a sub-milestone and I can only achieve this through links. another example is epics that have subtasks that can be reused to other epics, I do them through linking them by 'is parent of' or 'is child of' relationships
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I made suggestions for 1-to-many possible rules, and so...
Using your current rule, I recommend disabling that one, copying it, and then using the ideas I suggested to create one single rule with the new trigger (e.g., for issue created).
Before doing that, perhaps use an example issue to create the JQL needed to identify both the "parent" and "child" issues. This will make using the Lookup Issues action and the Branch on JQL easier to implement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, I will look into the example and create one using the existing rule.
Is it possible for you to share one of the possibilities/basic of the rule so I can get an idea.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Certainly! The "created" scenario will be similar to your current rule:
Please review the JQL used and the link names to confirm that match your configuration. Those could be tested standalone with example issues to confirm they work as expected, and then use the JQL in the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Bill!
I applied this rule but this doesnt work as per the audit log I have attached. Can you let me know why this could be the case?
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.
Reviewing the branch shown, it does not match what I suggested (using JQL), and it is not returning any issues (as shown by the audit log).
Please update the branch as needed to branch to the correct "parent" linked issues and then re-test.
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.