Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation - Add parent FixVersions to new ticket

anne.gerten
Contributor
August 23, 2024

Hello,

I created an automation that should add the parent ticket fixVersion to a newly created ticket.

This is my edit rule:

jira fixversion automation.JPG

 

When creating a ticket, and running the automation, I get this error:

jira fixversion automation 2.JPG

Any tips what I could do?

Thanks!

1 answer

1 accepted

4 votes
Answer accepted
Trudy Claspill
Community Champion
August 23, 2024

Hello @anne.gerten 

You can do that without using Advanced Editing.

Screenshot 2024-08-23 at 12.30.04 PM.png

anne.gerten
Contributor
August 23, 2024

That worked, thanks!!

 

If a parent has multiple fixVersions, is it possible to add only specific fixVersions to the children, like for example all parent fixVersions that start with Test? 

Trudy Claspill
Community Champion
August 23, 2024

That would be a more complicated rule requiring you to figure out if there were Versions in the parent's Fix Version field that match your criteria, getting their full names, and then adding them to the child issue.

Adding them to the child issue would require Advanced Editing. An example of setting multiple values in the Fix Versions field can be found here:

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Fix-Versions

I think I have worked it out:

I've added some Log actions to log information to the Audit Log for the rule execution. You can keep those or remove them.

Screenshot 2024-08-23 at 1.27.33 PM.png

Screenshot 2024-08-23 at 1.28.42 PM.png

 

1. Use a For Each Smart Value branch to iterate through the list of Fix Version values in the parent issue.

Screenshot 2024-08-23 at 1.31.57 PM.png

2. Check if the current value from the list starts with the relevant text.

Screenshot 2024-08-23 at 1.32.38 PM.png

3. Edit the issue to add that value to the Fix Versions field. In this case we have not changed to focus of the rule to any other issue (i.e. the parent) so the Edit action will operate against the issue that triggered the rule.

Screenshot 2024-08-23 at 1.33.21 PM.png

anne.gerten
Contributor
August 23, 2024

This worked great. Thanks so much!!

Like Trudy Claspill likes this
anne.gerten
Contributor
August 23, 2024

Is it possible to do the same for when creating a new issue without parent first, and then when "manually" adding this new issue to a parent epic, to then run this rule as well to the newly added ticket to the epic?

Trudy Claspill
Community Champion
August 23, 2024

Yes, but the trigger would be different. You would use the Field Value Changed trigger to monitor the Parent field for changes. 

And you need to consider which scenarios you want to handle:

1. Is this only when an issue that has no current parent Epic is added to an Epic?

2. Or do you want to handle a situation where an issue is moved from one Epic to another?

2.a. In that case do you want to clear the Fix versions from the child issue and start fresh with the new parent epic? Or just keep adding fix versions to the child issue?

3. What do you want to do, if anything, if an issue is removed from an Epic but not assigned to another Epic?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events