I have two object types in Assets:
Software has an attribute called Locations, which pulls from/refers to the objects in Location.
I have two Assets custom fields:
Via Automations and ignoring triggers, when the "Software title" custom field is populated with an object, how can I take the value(s) from the Locations attribute of that object and copy them into the "Software locations" custom field?
Figured it out; it was as simple as using the Edit issue action (setting the value for the Software locations field) and inserting an AQL query like so:
objectType = Location AND object having inR(Key IN ({{issue.Software title}}))
You must have the actual Asset referenced in the Asset Custom Field for this to work.
If you do, then you can use smart values to access the Attributes of an Object stored in an Asset Custom Field on an issue.
Eg: {{issue.fields."Software title"."Some Attribute"}}
And if the Attribute on the Asset is an Object type, then you can dot reference its attributes too.
Eg: {{issue.fields."Software title"."Locations"."Attribute In Linked Location Object"}}
You can then use the "Edit issue" action to set the required Issue field with the value returned from the Asset, using this smart value.
If the field is not available from the drop down list on the Edit issue action, you may need to use the Advanced field editing options.
See here: [https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Edit-issue]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Cael,
I didn't realize you could chain like that. Unfortunately, this is the response I get in the Audit Log when I try that method:
An error occurred while requesting remote information
Bad Request
No fields or field values to edit for issues (could be due to some field values not existing in a given project):
The "Software Locations" Assets custom field is available from the drop down list, is on the appropriate screens, and can be edited by the actor of the automation rule.
I logged the values that {{issue.fields."Software title"."Location"."Attribute In Linked Location Object"}} returns (which are correct), and this is how they're presented:
[location_a, location_b]
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.