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.
Hi @vincenzo.spatafora
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
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
Hi Vincenzo,
Could you paste the exact json string you used for this rule?
I believe it works in Jira DC too.
Thanks @Ponnappan Ganapathiya,
there you go:
{ "fields": { "fixVersions": [ {{#issue.fixVersions}}{"id": "{{id}}"},{{/}}{"id": "{{version}}"} ] } }
Cheers, Vincenzo.
the smart value in the example might be missing the closure tag:
{
"fields": {
"fixVersions": [
{{#issue.fixVersions}}{"id": "{{id}}"},{{/}}{"id": "{{version}}"}
<strong> {{/}}</strong>
]
}
}
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
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}}"},<strong>{{/}} </strong>"id": "{{version}}"
<strong>part of the json. </strong>
You want to see that you're extending
There's a couple of curly braces that I left out intentionally. Try the above please.
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?
I create a replica of this its working good. I think the problem is not with this part.
Could you please confirm the version and the issues belonging? Maybe the condition missing or conflict with the project where the version is created.
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 ?
Hi @Bill Sheboy ,
nice to hear from you.
Do you mean like this:
{"update": {"fixVersions": [{"add": {“name”:"{{destinationIssue.fixVersions}}"}}]}}
You get:
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}}, {{/}} {{/}} ] }}
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.
It looks like you're new here. Sign in or register to get started.