Hi, I am struggling with the automation that is quite straightforward.
I have issue A, the automation starts from the Action button. The popus asks for the fixVersion to be provided and once it is completed the linked issue is created, lets call it issue B.
Here is the automation
and the specified value for the fixVersion in the issue B:
{
"fields": {
"fixVersions": [{ "value" : "{{userInputs.{{BackportFV}}}}" }]
}
}
The automation creates the Backport issuetype but the fixVersion field does not populate to issue B FixVersion field. No errors in the audit log. Any hints?
I also tried to add a new component and edit the issue. Then the same code removes the FixVersion from the original ticket.
Hi @Szymon F
To set the Fix Version values with JSON the attribute is "name" and not "value". Please look here for more information: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Fix-Versions
If that does not work, please post images of your Create Issue action and of the audit log details showing the rule execution. Those may provide context to explain what you are observing. Thanks!
Kind regards,
Bill
Hi @Bill Sheboy ,
thank you for the suggestion - I did try that already but then the logs looked like this:
Important note that the fixVersion exists in the project so the automation does not create it by itself.
Here is the automation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also made a change in the code based on your suggestion from the post: https://community.atlassian.com/t5/Jira-Software-questions/automation-Add-fix-version-to-existing-fix-version-when-creating/qaq-p/1821136
{
"update": {
"fixVersions": [
{
"add": {
"name": "{{userInputs.{{BackportFV}}}}"
}
}
]
}
}
but this also threw an error:
Another try with the hardcoded version id:
{
"fields": {
"fixVersions": [{ "id" : "17827" }]
}
}
works and the FixVersion is assigned to the new ticket
Another one, I saw somewhere that instead of the code I should be able to update the field in the SET option. But the smart value is not visible here:
example here
I also put the code into the Description field:
1. {{userInputs.BackportFV}}
2. {{userInputs.{{BackportFV}}}}
and here is the outcome in the ticket:
1.
2. }}
so first of all the variable should be {{userInputs.BackportFV}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, and I see some extra curly brackets in your smart value expressions which need adjustments.
First in your manual trigger, when defining a variable name, it does not include the brackets. Please remove those and only use BackportFV for the variable name. Later when it is referenced, it would include the brackets, like this: {{userInputs.BackportFV}}
And so the JSON needs updates also. Please try this one to set the value:
{
"fields": {
"fixVersions": [
{ "name": "{{userInputs.BackportFV}}" }
]
}
}
As the rule is creating a new issue, the update is not used (because the issue does not exist yet).
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.