automation: Add fix version to existing fix version when creating task

Dominique Hermens September 30, 2021

I found out how to create a version (depending on the issue.summary) and then how to add it to the issue just created. 

Now I want to also add the version of the parent task. 

My Problem: When I create a task without parent (link epic) it works perfect. The new version is created and added.

When I create a task with an epic link I see who the first version gets deleted and the version of the parent is added. 

Although I marked "Add to existing version" in the change issue field for versions. image.png 

3 answers

1 accepted

2 votes
Answer accepted
Dominique Hermens October 7, 2021

It is important to choose "Add Fix Version" and not "Copy Fix Version". In fact I did everything right. The If/Else part before this was too complicated and partly wrong. 
Therefore I made a separate rule and now it works. 

lila November 29, 2023

Hey there, i dont have those options, just "last release version" and i added {{version.name}} - this does as you encountered initially - replace the previous fix version rather than adding the new one. Any tips? 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 29, 2023

Hi @lila 

As this thread is quite old, I recommend creating a new question and linking back to this thread.  That will ensure more of the community sees it to offer suggestions.  Otherwise only the people following this older thread will see it.  Thanks!

Until we see that question...

Did you notice the ... options to the right of the Fix Versions field when it is selected with the edit fields action?  If you select the ... and then Copy, those other options will be available.

Kind regards,
Bill

lila November 29, 2023

Hey Bill, you mean in the dropdown? i dont have those options :

Screenshot 2023-11-30 at 2.28.44 pm.png


And the "..."either 

Screenshot 2023-11-30 at 2.27.48 pm.png

Ive added some code under more option ...  hopefully this would help? 


Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 29, 2023

When editing a field, you cannot use both the selection from the drop-down list and the JSON edit.

What value(s) are you trying to set in the fix version field?

lila November 29, 2023

I want to add the last released version which is set as {{release.version}} 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2023

Is that a custom field as it is not a built-in smart value for {{release}}?

Please post an image of your complete automation rule, the details of any actions, and the audit log details showing the rule execution.  Those will provide context so we are aligned on how / where you are trying to update the Fix Versions field.  Thanks!

lila December 7, 2023

Hey Bill, sorry about the delay - see below 

Screenshot 2023-12-07 at 8.21.55 pm.pngScreenshot 2023-12-07 at 8.21.22 pm.pngScreenshot 2023-12-07 at 8.21.15 pm.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2023

Thanks for that information, @lila 

When editing a field with that action, you may only use the field from the drop-down list or edit with JSON.  You cannot do both in one edit action.

Do you want to replace the value in the Fix Version field or to add values to it?

  • if replace, use the dropdown field method, and  clear out the JSON section
  • if add, use the JSON section and remove the field from the dropdown by de-selecting it
lila December 7, 2023

Amazing!!  I want to add not replace. Should i use (our versions are version.name format)

{
"update": {
"fixVersions" : [
{
"add": {
"name": "{{fixVersionName}}"
}
}
]
}
}

or 

{
"update": {
"fixVersions" : [
{
"add": {
"name": "{{version.name}}"
}
}
]
}
}


Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 8, 2023

If you are trying to add the version from the trigger, please use the second one:

{{version.name}}

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

NC February 13, 2024

Hi @Bill Sheboy

I am trying to do something similar I'm working on setting up a Jira automation rule aimed at appending the latest released version to the "Affects Version/s" field of all unresolved bugs that weren't part of the current release. See image below, however I am getting an error that the affects version is not adding the shipped version. The 2nd edit that updates the fix version to the next scheduled version works.

2024-02-14_17-32-59.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2024

@NC -- I will respond in that other thread as this is a new question.

Like NC likes this
1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2021

Hi @Dominique Hermens 

Would you please post images of your complete rule and the audit log showing details of the execution that does not work as you expect?  That additional context may help the community to offer ideas.  Thanks!

Kind regards,
Bill

Dominique Hermens October 4, 2021

Hey Bill,
I do not know what the problem was exactly but maybe I had to many "if/else" cases is this rule, so I just made a new rule with only this part and it works...

Dominique Hermens October 4, 2021

Can I delete this question somehow?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 5, 2021

Hi!  I don't know how to do that, but instead you could:

add your own answer to explain, and then mark that one as "solved".

0 votes
Núria Rull Bassols March 20, 2024

not the right post

Suggest an answer

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

Atlassian Community Events