Edit Asset Object Attributes from the Ticket with Automation
Asked by Arnold Rolle:

I would like to have an automation run when a form is attached and submitted on a ticket. The form has a custom field with the list of asset objects, and a custom field for storing a text attribute. I would like the automation to find the object selected on the form and edit one of its attributes with the text from the form.

The problem I am having is that JSM Cloud's Edit Object action only seems to be usable when the object is created in the automation.

Currently I am using the lookup object action to find the selected object from the form with this query:

objectType = "Available" AND object having outR(Name="{{product}}")

where the variable product is the object selected on the form. I am able to return all of that objects attribute data in a comment for testing purposes (to make sure I'm actually working with the correct object), but I am unable to edit it through the automation. I have seen some people mentioning the "Edit Insight Object" action but that is unavailable in JSM Cloud. As shown below I tried making the object the main focus by branching, hoping for the edit object attributes to work on that specific object, but it does not. Any Ideas or assistance would be appreciated.

![object.png](https://community.atlassian.com/t5/image/serverpage/image-id/334767i96275D32A8AB988D/image-size/large?v=v2&px=999 "object.png")


Answers:
author: Mikael Sandberg
body: The only branch you can use when using the edit object attributes is the AQL one. so in your case remove the lookup objects and the smart value branch and replace it with Branch on AQL. You can then run actions on the objects returned by the AQL.

comments: author: Arnold Rolle
body: Thanks for the quick reply, Mikael. I don't seem to have the ability to Branch on AQL, this functionality may not be available on JSM Cloud, or I may be looking in the wrong location.


author: Mikael Sandberg
body: It looks like the branch on AQL has been removed from automation for some reason, not sure if it was intended or not. I would submit a support ticket to find out. This is what the documentation says regarding [edit object](https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Edit-object):

You can only use this action:

* for global automation rules and only when an object is the focus of the rule. For example, if the rule begins with an **Object** **trigger**, the object that triggered the rule will be the object that is edited by this action.

* when it's under a branch on an AQL branch. It won't work on its own and it won't work with the **Lookup objects** action.


author: Arnold Rolle
body: I'll put in a support ticket to see what they say. Thanks for the help Mikael!


author: Mikael Sandberg
body: I just found it, they have moved it so you have to be under Global automation in order to get access to branch on AQL:

![Screenshot 2024-07-15 at 3.33.32?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/335758iF51555E37B231E63/image-size/large?v=v2&px=999 "Screenshot 2024-07-15 at 3.33.32?PM.png")


author: Arnold Rolle
body: You are a life saver sir! Thank you so much!


Tags: assets

automation

cloud

jira-service-management

jira-service-management-cloud