Hi all,
I'm attempting to create an automation rule where a newly created child issue (e.g. story) will automatically take the parents (e.g. Epic) most recent Fix Version.
For example, an Epic contains 4 fix versions - CSP-24.1, CSP-24.2, CSP-24.3, CSP-24.4. The most recent fix version in the list of 4 is the last one added - CSP-24.4.
When a child issue is added to the Epic, preferably it shouldn't pick up all 4 (which is the automation I have in place at the moment). The child issue should only pick up the CSP-24.4 fix version as it's the most recently added in the group. This should only apply to child issues that are not in 'Done' status (as 'done' child issues should not have their fix versions changed after completion).
The releases / fix versions are below:
The example Epics fix versions are below:
The rule I've attempted to create is below:
When I create a new story under the epic, the audit log is shown below:
Does anyone know what I'm doing incorrectly? I think it may be the Smart Value in the automation rule.
Thanks for your help.
Chris
There is no list function "latest" to find what you asked.
Assuming the most recent / latest version is always the last one created, you could do this by the ID value (as that is required for the edit):
{{issue.fixVersions.id.max}}
If not, things get more complicated...
Instead you would need to find the maximum releaseDate value in the list of versions selected, and then use dynamic searching methods to extract the ID value:
Kind regards,
Bill
Hi Bill,
Thanks for getting back to me about this.
I've updated the Variable Smart Value to '{{issue.fixVersions.id.max}}' as you suggested.
Unfortunately the most recent created fix Version is still not being added to the newly created child issue.
The audit log is below:
It looks like the branch rule / related issues can't be found for some reason. Which is strange as the branch goes out to the 'children' as expected.
Do you have any other ideas how I can get this working?
Also, thanks for sharing the more complicated resolution. I'm not expert enough to try this!
Thanks,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What the audit log shows is the rule is not finding any child issues, so I am unclear what you mean...and that seems unrelated to copying the Fix Version value.
And reviewing your original rule image, one of the conditions checks if the trigger issue is an Epic, Story, Sub-task, or Task...but Sub-tasks cannot have children.
Let's confirm your scenario:
GIVEN a parent issue is an Epic, Story, or Task issue type
AND the parent issue has at least one value in the Fix Version field
WHEN an issue is created as a child of the parent issue
THEN copy the most recently created version from the parent issue's Fix Version to the child's Fix Version field
How does this compare to your scenario?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Thanks for the quick response.
The scenario you've listed is exactly correct. The only additional point is that any existing children of the parent issue that are in 'Done' status should not have their fix versions amended.
So when a child issue is created in the screenshot below, the CSP-25.1 fix version is added to it:
Nothing should change for the child issue already in 'Done' status.
The automation rule (including the '{{issue.fixVersions.id.max}}' smart value you recommended is below:
Thanks again for your help.
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for confirming the scenario!
First thing: unless someone sets the Status to "Done" when the issue is created, one rule will work for this. A condition may be added to prevent problem.
The key is you to update the created issue from its parent using a lookup rather than a branch as the source, and so let's try this:
This will work if all of the issues are in the same project. When the parents (such as an Epic) could be in another project, the rule will need changes to scope and additional conditions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Thanks for the comprehensive response.
There still seems to be a slight error somewhere in the process (possibly with the lookup action?). The overall automaton is in 'Success' status but the newly created child issue does not copy the Parents latest Fix Version. I will share the screenshots below:
Audit Log:
I think we're very close to have this working properly. Really appreciate your help.
Thanks,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops, you are correct: I had the JQL for the lookup issues action reversed. It should be:
key = {{triggerIssue.parent.key}}
I updated my earlier post to match.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works perfectly! Thanks a lot Bill! :)
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.