I am having a hard time setting a field value in Automation. I read the following docs but could not get it to work.
https://confluence.atlassian.com/automation/advanced-field-editing-using-json-993924663.html
On my issues, I have a custom text field called "Customer address" and a custom Insight object field called "Site", which accepts multiple values.
I created an automation rule to set the "Customer address" field value from the custom Insight object field when the Site field value changes.
I set the field value as
{{issue.Site.Name}} - {{issue.Site.Address}}
The insight objects "Site" look like this :
Site 1
Name : Site 1
Address : ABC
Site 2
Name : Site 2
Address : XYZ
When the Insight object field has only one value (Site 1) the value copied is : "Site 1 - ABC" which is correct.
But if the Insight object field has 2 values (Site 1 and Site 2) the value copied is : "Site 1, Site 2 - ABC, XYZ" where I would expect to have "Site 1 - ABC, Site 2 - XYZ".
Any idea how I can achieve that?
As usual, it's when you ask that you get it to work...
{{#issue.Site}}{{Name}} - {{Address}}{{^last}}, {{/}}{{/}}
Will set the value to
when there is only 1 value, and
when there are multiple values
This page helped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.