How to Append New Version to "Affects Version/s" Field Without Overwriting Existing Values in Jira A

NC February 13, 2024

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. However, my current automation setup replaces the existing values in the "Affects Version/s" field with the new version, rather than adding to them. I'm looking for a way to modify my rule so it appends the new version to the list of affected versions without deleting the existing ones. Here's what I've tried so far, but I'm encountering an error: "Error while parsing additional fields.


Could anyone provide insights on the correct syntax or method to achieve this without overwriting the existing versions? Any advice or examples of similar automation rules that successfully append values would be greatly appreciated.

2 answers

0 votes
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

Hi @NC 

Looking at the rule image from your other post here:

https://community.atlassian.com/t5/Jira-Software-questions/Re-Re-automation-Add-fix-version-to-existing-fix-versi/qaq-p/2608692/comment-id/921557#M921557

 

By default, actions in rules use the values of the issues based on time-of-load.  And so your second edit may be colliding with the changes from the first one:

  • the first edit appears to set the Affects version...
  • and the second one clears it, because the field is selected from the drop-down list

I recommend performing both edits in a single action, and then retesting.

If that does not work, please post images of your complete rule, the details of the actions, and of the audit log details showing the rule execution.  Those will provide context for the community to offer ideas.

 

Kind regards,
Bill

0 votes
Kalyan Sattaluri
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 13, 2024

Hello @NC 

I am guessing your trigger is version released,

If you do lookup of all open issues,

then for each, In the edit field section, expand more options and in "additional fields" section, you can specify below JSON to "add" the released version to the existing list of affect/s version.

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

 

image.png

 

Reference: https://community.atlassian.com/t5/Jira-Software-questions/automation-Add-fix-version-to-existing-fix-version-when-creating/qaq-p/1821136 credit to @Bill Sheboy 

Kalyan Sattaluri
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 15, 2024

Hello @NC 

I just tested the screenshot you shared and it seems to be working correctly for me. I was able to update Affect Version and Fix Version for each unresolved issue like you had shared. 

If you still have issues, please post screenshots of rule & audit log.

Also, Just FYI, instead of editing fix version to next unreleased, you could do that at the time of the release so you can avoid that step. So you can try that as well.

OTOH, if you have solved your issue and its different than whats suggested, please post and mark your answer as Accepted so others can benefit.

Galina Raskoshnaia February 28, 2024

Hi guys, 

is there a way to ADD "Next unreleased version by release date" to the existing FixVersion (not override)? 

is there anything like {{version.last.name}}?

Kalyan Sattaluri
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 28, 2024

Hello @Galina Raskoshnaia 

There is no direct smart value I know of. I have been able to follow along below post, except until the last .match step. I need to spend some more time, but as you can see, to get the next unrelease version name, you have to do some pre steps...

My recommendation is to open a new thread asking the same question and maybe community has newer options to find them out.

https://community.atlassian.com/t5/Jira-Software-questions/Jira-Automation-Get-the-next-unreleased-version-by-criteria/qaq-p/2202432#:~:text=I%20think%20I,earliest%20release%20date.

Sorry I coudnt be of much help but this community is awesome and will def find a solution for you if you are persistent!

 

 

Like Galina Raskoshnaya likes this

Suggest an answer

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

Atlassian Community Events