Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can you set multiple objects through Jira automation for an Assets field?

Tom Brown October 3, 2023

Hi,

I am trying to set a custom field (Assets object) using Jira Automation. The custom field is configured as Multiple = True. In Jira issues I can select multiple objects in this custom field. In Jira Automation I can only select a single value.

Is this a limitation of Jira Automation or am I missing something. If it is a limitation can anyone help with the JSON to set multiple objects to an Assets field using the Additional fields section?

Thanks,

Tom

1 answer

1 accepted

0 votes
Answer accepted
Tom Brown October 3, 2023

I have the JSON working now but I would still like to know if I should be able to set multiple objects using the 'Choose fields to set' option.

For info the JSON is:

{
    "fields": {
                 "customfield_11810": [{"key" : "TMC-1449"}, {"key" : "TMC-1450"}]
                 }
    }
}

Aleksandra Leesment May 7, 2024

It doesn't work when you try to use JSON and Advanced field editing. For me it worked, when I edited the custom object type field and set value as:

key in (object1-key, object2-key, object3-key,...)

Example:

key in (TMC-1449, TMC-1450)

Screenshot 2024-05-07 at 17.10.46.png

You can list all the objects manually or use smart value with the list:

key in ({{your_list}})

NB! If the list has [ and ], then don't forget to remove them. For example, by using .replace():

{{your_list.replace("[","").replace("]","")}}

The end result would be:

key in ({{your_list.replace("[","").replace("]","")}})

And add it as value when editing the field:

Screenshot 2024-05-07 at 17.06.22.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events