Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Dear Community,
I would like to create an automation rule in order to append a new release to the Fix Version field containing already other releases.
I have found this post:
Update multiple fix version with automation for jira | Automation | Atlassian Support
and follow the given instructions.
Unfortuntaley, you get the following error against step 4 instruction:
(Version id '' is not valid (fixVersions))
Do you know as why?
Can somebody help me out?
Thanks, Vincenzo.
The doc seems to be related to JIRA Cloud not JIRA DC.
Not sure what the trigger of the automation is but you can append FixVersion by using the edit issue action and FixVersion field with the following value.
In this example if add V1 to the current list of versions.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Florian Bonniec,
thanks a lot.
I have tried that out as well and it works BUT:
if the Fix Version array field has got already more than 1 element (release value), the automation rule is overwriting all the existing Fix Version field values which I don't want.
Do you see a way out?
Thanks, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the trigger you are using and where does the version to happen come from ? Is it always the same ? Is it a version from another field ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
first of all I confirm that the issues and releases belong to the same project whose Jira DC version is 9.12.12.
In my case, the trigger is Issue Linked and the condition Fix Version not empty.
If so, the rule is supposed to update the linked issue fix version field with the value of the destination issue; it does that but it also overwrites the exisiting fix version values, so I've come across the item I have posted in my question description.
I have followed your suggestion and as said it works but overwriting the existing values:
I understand there is a work aroud by using the Advanced Edit but I don't get right the JSON syntax or genuily there is a bug.
Thanks, Vincenzo.
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.
Have you try this configuration ?
Select FixVersion then ... > Copy From and the config above.
Check add to existing values
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks: it does nothing, I understand because in this specific case the issue is the trigger issue.
Cheers, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Florian Bonniec
yeah, that's the way to do it; it works.
So true: sometimes you are in the woods and you don't see the tree.
Kind Regards, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dick @Ponnappan Ganapathiya @Florian Bonniec @Bill Sheboy
thank You very much for your help, very appreciated.
Grazie, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The article you linked-to is for Jira Cloud and it describes replacing by update, not appending to the list of Fix Versions values.
For Jira Server / Data Center, please use the name attribute for Fix Version instead of the id.
And, use the "add" syntax with "update" to append to the list.
To see examples of this syntax, please look here: https://confluence.atlassian.com/automation/advanced-field-editing-using-json-993924663.html
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy ,
nice to hear from you.
Do you mean like this:
{
"update": {
"fixVersions": [
{
"add": {“name”:"{{destinationIssue.fixVersions}}"}
}
]
}
}
You get:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There can be multiple values in the Fix Versions, and so they must be iterated over with an "add" for each one:
{
"update": {
"fixVersions": [
{{#destinationIssue.fixVersions}}
{ "add": { "name": "{{name}}" } } {{^last}}, {{/}}
{{/}}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You @Bill Sheboy , works indeed.
Very appreciated, thank a lot and I have tried that out with "id" (instead of "name") and for your info, with Jira DC 9.12.12 it's working too.
Have a nice evening, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the smart value in the example might be missing the closure tag:
{
"fields": {
"fixVersions": [
{{#issue.fixVersions}}{"id": "{{id}}"},{{/}}{"id": "{{version}}"}
{{/}}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Dick,
I have tried that out and you get now the following error message:
Error while parsing additional fields - Mismatched start/end tags: null != in template
Cheers, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vincenzo,
on hindsight, I see the {{/}} in your equation. Then you proceed with a comma, followed by your own version smart value {{version}}.
You can let the automation log the
{{#issue.fixVersions}}{"id": "{{id}}"},{{/}} "id": "{{version}}"
part of the json.
You want to see that you're extending
the existing values separated by comma's with the new value. You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's a couple of curly braces that I left out intentionally. Try the above please.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Total should be:
{
"fields": {
"fixVersions": [
{{#issue.fixVersions}}"id": "{{id}}",{{/}} "id": "{{version}}"
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Within the square brackets is the array of strings.
In JSON format that would be something like ["string A", "String B", "String C"]
that's why I removed the curly braces around your array elements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Dick.
You get now:
Error while parsing additional fields. Not valid JSON.
I use Jira Data Center version 9.12.12.
Kind Regards,
Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, then it's not a complete string array, but an array of objects needing the single curly braces to encompass each element in the array...
{
"fields": {
"fixVersions": [
{{#issue.fixVersions}}{"id": "{{id}}"},{{/}}{"id": "{{version}}"}
]
}
}
{{#issue.fixVersions}}{"id": "{{id}}"},{{/}}
for me?
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.
Vincenzo, what is the value of the smart value {{version}} from your automation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dick,
I get no value out of it from the log and no error from the log.
By the way, it seems we got to use "name" instead of "id".
Cheers, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vincenzo,
Could you paste the exact json string you used for this rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Ponnappan Ganapathiya,
there you go:
{ "fields": { "fixVersions": [ {{#issue.fixVersions}}{"id": "{{id}}"},{{/}}{"id": "{{version}}"} ] } }
Cheers, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I create a replica of this its working good. I think the problem is not with this part.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please confirm the version and the issues belonging? Maybe the condition missing or conflict with the project where the version is created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I confirm that either the issues and releases belong to the same project.
Are you using DC or Cloud?
Cheers, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@vincenzo.spatafora I am using DC 9.12.7
Hope you have validated the manual operation too. Like create a version and add that to the issues matching the condition you provided in the automation.
Regards,
Ponnappan.
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.