Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add multiple objects to Object field using Edit Object automation action

David Foote
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2025

Hi,

I have an attribute on an object that can store multiple references to other objects. In this case a 'Business Application' object that has a field for 'Technical Owners' that can hold multiple references to an 'End User' object.

I am trying to use the 'Edit Object' action in a 'For AQL' branch to append a new Object to the values already stored in 'Technical Owners' but haven't had any success. The automation will always log "Objects successfully updated" but nothing happens.

 

I feel like I'm just missing the correct format; I've tried AQL of Key In (...), text comma separated lists, JSON formatted lists of just the keys, JSON formatted lists of objects with  key:value pairs, all sorts of stuff and nothing seems to work.
The documentation for the Edit Object action says
"Assets attributes can have many different types of values (string, integer, user, date, reference object, etc.), so you have to get the input right here. This rule will result in an error if the value in this action doesn't match the attribute type. Learn more about Assets in Jira Service Management."
but the link doesn't work and it doesn't give any other ideas...
So, if you know the format for Edit Object and how to specify multiple values I would appreciate hearing from you!

3 answers

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
October 2, 2025

Hello @David Foote 

Jira doesn't currently support editing mutli-value Asset Object attributes in the Edit Object automation action. There is a change request about that here:

https://jira.atlassian.com/browse/JSDCLOUD-11392

To accomplish your goal through Automation you would need to use the Send Web Request action and interact with the API for editing objects. I see you already have figured out the API call. Have you already added that to your rule with a Send Web Request action?

Trudy Claspill
Community Champion
October 2, 2025

I did find a post with an alternate suggestion about using the Edit Object Attribute action instead.

https://community.atlassian.com/forums/Jira-questions/Add-two-values-to-Asset-object-through-JIRA-automation/qaq-p/2298642

I have not tested this myself.

It references an article that talks about setting multi-value attributes, but the article does not specifically mention setting Object type attributes.

https://support.atlassian.com/jira/kb/how-to-append-objects-to-an-assets-object-attribute-using-automation/

Like David Foote likes this
Valerie Knapp
Community Champion
October 2, 2025

Thanks @Trudy Claspill !

Like Trudy Claspill likes this
David Foote
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2025

That article had the solution! https://support.atlassian.com/jira/kb/how-to-append-objects-to-an-assets-object-attribute-using-automation/

Essentially, because it is expecting a list, we can't just pass a string and get it to work. But by using the .split function on a string, we can get it in a list format and then multiple values will be set.

For future reference, here is what I set the userObject variable to: 

"CMDB-33551","CMDB-33839"

And then in the Edit Object action I used the following smart value in the Technical Owners field and the object updated successfully to have two values:

{{userObjects.split(",")}}
0 votes
Valerie Knapp
Community Champion
October 2, 2025

@Bill Sheboy , @Trudy Claspill do you have any advice for how to help with this?

Thanks in advance

0 votes
Valerie Knapp
Community Champion
October 1, 2025

Hi @David Foote , thanks for your post.

Please can you share some screens of the automation rule and the objects (anonymised is fine)?

You are trying with an action to add more Technical Owners to the object. Have you tried using JSON for this? https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/ 

We had a sort of similar use case once where we needed to update which instance an object needed to be sync-ed with, but, sometimes the object needed to be sync-ed to both. So, rather than use the edit field and update to the new value, we needed to be able to add an additional value to what was already there.

If you can share some more information, we will try to help you get this working.

Cheers

David Foote
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2025

Hi @Valerie Knapp  - unfortunately the 'Edit Object' action does not let me use JSON like the 'Edit Issue' action - which I would really love to be able to do!

Here is the Object configuration, I've highlighted the attribute technical-owners-attribute.png

Here is the cardinality of that field; I don't have any issues putting multiple objects in there via the UI technical-owners-cardinality.png 

Here is the automation where I just simple AQL branch on one object, log the value of the 'Technical Owners' field and then try to update it; I'm just hardcoded all values right now to try and get it work.

more-simple-automation-edit.png

And finally, here is the audit log where it shows there is only one value in Technical Owners (the first log section) and then runs the Edit Object. It says it runs successfully but going to object shows that nothing changes

 

edit-object-audit-log.png

 

I have Key in ("CMDB-33551", "CMDB-33839")

in the Edit Object value right now, but I've tried many different formats with no success yet.

Edit: I have noticed that it will update based on Key in ("CMDB-33551", "CMDB-33839") - but it sets it to the last value in the list - it will not add multiple objects.

David Foote
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2025

Here are all the iterations of hardcoded values I've tried to set multiple values without luck:

CMDB-33551, CMDB-33839
"CMDB-33551", "CMDB-33839"
["CMDB-33551","CMDB-33839"]
"CMDB-33551" || "CMDB-33839"
CMDB-33551 || CMDB-33839
["CMDB-33551" || "CMDB-33839"]
Key in ("CMDB-33551", "CMDB-33839")
Key in ("CMDB-33551"), Key in ("CMDB-33839")
Key in ("CMDB-33551") || Key in ("CMDB-33839")
[{"objectKey": "CMDB-33551"}, {"objectKey": "CMDB-33839"} ]
{"objectKey": ["CMDB-33551","CMDB-33839"]}
{"key": ["CMDB-33551","CMDB-33839"]}
{"objectAttributeValues": [{"objectKey": "CMDB-33551"}, {"objectKey": "CMDB-33839"}] }
[{"value": "CMDB-33551"}, {"value": "CMDB-33839"} ]
[{"value": "CMDB-33551"}, {"value": "CMDB-33839"}]
{"objectTypeId": 96,"attributes":[{"objectTypeAttributeId": 2969,"objectAttributeValues":[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]}]}
{"value": ["CMDB-33551", "CMDB-33839"]}
"attributes":[{"objectTypeAttributeId": 2969,"objectAttributeValues":[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]}]}
{"objectAttributeValues":[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]}
"objectAttributeValues":[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]
[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]
{"value":"CMDB-33551"},{"value": "CMDB-33839"}
{"CMDB-33551","CMDB-33839"}

 

have been able to set multiple values via the API using the PUT /object/{id} endpoint and passing the following body:

 

{
    "objectTypeId": 96,
    "attributes": [
        {
            "objectTypeAttributeId": 2969,
            "objectAttributeValues": [
                {
                    "value": "CMDB-33551"
                },
                {
                    "value": "CMDB-33839"
                }
            ]
        }
    ]
}

 

David Foote
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2025

Here are the hardcoded values I've tried in 'Edit Object' without success

 

CMDB-33551, CMDB-33839
"CMDB-33551", "CMDB-33839"
["CMDB-33551","CMDB-33839"]
"CMDB-33551" || "CMDB-33839"
CMDB-33551 || CMDB-33839
["CMDB-33551" || "CMDB-33839"]
Key in ("CMDB-33551", "CMDB-33839")
Key in ("CMDB-33551"), Key in ("CMDB-33839")
Key in ("CMDB-33551") || Key in ("CMDB-33839")
[{"objectKey": "CMDB-33551"}, {"objectKey": "CMDB-33839"} ]
{"objectKey": ["CMDB-33551","CMDB-33839"]}
{"key": ["CMDB-33551","CMDB-33839"]}
{"objectAttributeValues": [{"objectKey": "CMDB-33551"}, {"objectKey": "CMDB-33839"}] }
[{"value": "CMDB-33551"}, {"value": "CMDB-33839"} ]
[{"value": "CMDB-33551"}, {"value": "CMDB-33839"}]
{"objectTypeId": 96,"attributes":[{"objectTypeAttributeId": 2969,"objectAttributeValues":[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]}]}
{"value": ["CMDB-33551", "CMDB-33839"]}
"attributes":[{"objectTypeAttributeId": 2969,"objectAttributeValues":[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]}]}
{"objectAttributeValues":[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]}
"objectAttributeValues":[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]
[{"value":"CMDB-33551"},{"value": "CMDB-33839"}]
{"value":"CMDB-33551"},{"value": "CMDB-33839"}
{"CMDB-33551","CMDB-33839"}

 

I was able to use the API to successfully set multiple values using the PUT /object/{id} endpoint with the following body

 

{

    "objectTypeId": 96,

    "attributes": [

        {

            "objectTypeAttributeId": 2969,

            "objectAttributeValues": [

                {

                    "value": "CMDB-33551"

                },

                {

                    "value": "CMDB-33839"

                }

            ]

        }

    ]

}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events