Automate rule help : Adding a created test execution into the same fix version as a trigger issue
Asked by Nicola:

Hi All,

I am stuck on a rule - please could someone help or offer any advice?

I want to create a rule that looks like this:

* When an issue is added to a fix version, a test execution is created and linked to the trigger issue. But I also want that test execution to be added to the same fix version as the initial issue.

I managed to get the first part going, but I just can't figure out how to get the test execution added to the same fix version as the issue.

Any ideas would be much appreciated as always from this knowledgable community.

Thank you in advance


Answers:
author: Bill Sheboy
body: Hi [@Nicola](/t5/user/viewprofilepage/user-id/5299475)

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Until we see those...

When you create the issue (i.e., text execution) please select the Fix Versions field and copy the value from the trigger issue.

Kind regards,  
Bill

comments: author: Nicola
body: Thanks Bill. Here is a screenshot of what I have so far but its not complete.

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/316585iB5D1141A60A3BF28/image-size/large?v=v2&px=999 "Capture.PNG")


author: Nicola
body: The option you suggested is not available and that is what I was expecting to see. The drop down under Fix Versions just asks me to select a previous or current version.

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/316586i13599FEEFF260A3D/image-size/large?v=v2&px=999 "Capture.PNG")


author: Kalyan Sattaluri
body: Hi [@Nicola](/t5/user/viewprofilepage/user-id/5299475)

As Bill has suggested, on the edit issue screen, beside the Fix Version field, click the 3 ellipsis, choose Copy from, and select Trigger Issue to copy from and select Fix Versions from the dropdown field, as shown in below screenshot.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/316639iBE8B6D68E63874FF/image-size/large?v=v2&px=999 "image.png")


author: Nicola
body: Yess! Thank you! Apologies I missed the ellipsis.

Thank you [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) [@Kalyan Sattaluri](/t5/user/viewprofilepage/user-id/5312306) - much appreciated!


author: Kalyan Sattaluri
body: Hello [@Nicola](/t5/user/viewprofilepage/user-id/5299475)

Is this "test execution" a Jira issue?

If you have linked your newly created issue to trigger, I am guessing yowu know that you can reference this newly created issue as {{createdissue.key}}

I am not sure how you are linking it but to solve assigning fix version part.. you continue...

you do a branch, do a JQL with key = {{createdissue.key}}

then action edit issue and choose fixversion field and assign it {{issue.fixVersions}} smart value in the field.

Hope it helps. Please let us know if issues.

comments: author: Nicola
body: Hi Kalyan, Thanks for replying. Test execution is a Jira issue yes.

I am not familiar with branching but I will have a look and do some more reading to see if I can get your suggestion to work thank you!


author: Kalyan Sattaluri
body: Please see response on other post. Thats the correct / easy way to assign this field. No need for branching etc. Hope it helps and accept his answer if solution works!


Tags: cloud