Hi,
Appreciate some advice from the community on how to copy multi-select custom field values into Affects Version field.
For example, I have a multi-select custom field called Software Version and have multiple options selected in the field. Like Version 1, Version 2, Version 3.
In the automation, I've configured it to copy the Software Version -> Version 1, Version 2 and Version 3 into Affects Versions field when linked to another issue.
So far I have not been successful to make it to copy multiple values into Affects Versions field. But it works if it is copying a single value.
Thank you everyone in advanced.
Hi @Kelvin Teng
If you update your rule, first in the log action, change the smart value to {{triggerIssue.customfield_12721.value}}
And add another log action and use {{triggerIssue.customfield_12721.name}}
See what both actions log.
then we can move forward.
Hi Marc,
I've added log action for {{triggerIssue.customfield_12721.name}}, nothing is in the log
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kelvin Teng
But on value option you have information, so this is what we need.
Now create a variable, based on smart value {triggerIssue.customfield_12721.value}}
Use this variable in your edit action in the branch
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kelvin and Trudy,
The multi-select variable yields a list of consecutive values as an answer. In order to tell Jira it has to work with a list during the copying to the destination issue, you need to use {{#issue.multivariable}} similar to Atlassian on smart values and lists So the edit process should definitively be an advanced edit, not a regular one.
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've tried using advanced edit with the following:
{
"versions": {{triggerIssue.customfield_12721.value}}
}
And it returns the error below:
No fields or field values to edit for issues (could be due to some field values not existing in a given project)
I've also tried putting quotations "{{triggerIssue.customfield_12721.value}}" doesn't seem to help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The essential part (the multi-value part) is in the hashtag # :
And triggerissue has no capitals (no camel casing).
The value parsed should imo be part inside the loop in object notation: {{value}}
And the "human readable" name of the customfield should be used.
And you should close the multi-value part with the slash: {{/}}
{{#triggerissue.Affects Versions}}{{value}}{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kelvin Teng
Please show us screen images of your entire rule and the details of each step, so that we can advise you how to modify it.
Also please share the output in the rule execution log for the rule executing and trying to copy multiple values.
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.
What are the details of the Create Variable step?
What is the actual result? What is the value of the Affects Versions field when this rule executes?
A Variable is generally stored as a String. Attempting to copy a single string of comma separated values into a multiple selection field is not generally going to work. Instead you would have to do some parsing of the values and potentially some branching to get each value added as another value in the multi-select Affects Versions field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy,
Thank you for the quick response. The actual result is empty. There is no value populated in Affects Versions field. Below is the screenshot of the Create Variable step.
Instead, you would have to do some parsing of the values and potentially some branching to get each value added as another value in the multi-select Affects Versions field.
May I know how I can do this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kelvin Teng
Adding to Trudy's suggestions...
Do you want to replace the values in the destination issue's Affects Versions field or add to the existing values?
What is the type of your source, custom field: multiple-selection Version, multiple-section Option, something else?
If you want to replace the values and the source field is already multiple-selection, version type, the edit issue action could directly copy them, using the COPY option to the right of the field in the action.
For all other cases, your rule will need to use advanced edit with JSON to add the values by the name of the versions: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Affects-Versions
That may be done by iterating over the values in the source custom field to dynamically create the JSON for use.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.