Hi, I have a "part selection" form where the user can select a part in their inventory using a custom asset fields, that all works fine - But now am setting up automation so that when the form is submitted I can then edit the attributes of the part selected in the form.
So I've tried lots of different variations using customfield_xxxxx but nothing works, it never finds the object that was selected in the form.
Am I missing something here?
Hey,
I know this issue is a little old and you might have already found a solution. But for others who stop by.
Here is the AQL I used in my lookup object action (which first you must choose which Assets scheme you want to run the AQL against)
objectType= CI_CONTACT_SAP AND Email={{reporter.emailAddress}}
From there the variable created from the lookup action is {{lookupObjects}} which will return the object key like EXAMPLE-12345 from the Assets objectType CI_CONTACT_SAP.
Now you can use dot notation to extract attribute values for that object.
For example if you want the object attribute Name, you would do
{{lookupObjects.Name}}
In short the notation would be lookupObjects which holds the object key that we retreived from the lookupObjects automation action. Then put the attribute from that object you want the value from. {{lookupObjects.<object_attribute>}}
I am not sure if this answers the question directly but should help give insight on how to use AQL in the lookup Objects action and then use that variable in another action to perform comparisons, validations, or other actions based on the attribute value you want.
For the form you mentioned, if you need do a comparison to see if a specific name was selected, here is a screenshot of one I have (but keep in mind that I know the Asset Object ID im comparing to. If you need the ID dynamically the AQL example I give above should help give you a better understanding of how to get that with lookupObjects action)
Hi @Dave Nunn
The lookup action refers to lookup information in your Asset schema.
You ca only use AQL to find information placed in the scheme, you can't reference just a Jira CF.
You can look at Combining references, functions and AQL in the AQL documentation here
This to find your part and then edit it.
I'm not an expert in assests, but I think you have to think in this direction
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah - Ive tried lots of different variations of AQL
i.e: name = {{issue.customfield_xxxxx.name}}
But always says it cant find anything....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dave Nunn ,
In the look up you can't directly specify a custom field from Jira as the automation action link to the asset scheme and information in that scheme.
This link might provide more info: https://confluence.atlassian.com/jirakb/how-to-use-aql-placeholder-to-show-options-in-field-b-based-on-the-value-selected-in-field-a-1188757617.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry Mark, I'm not fully understanding.
I have tried:
Name = ${customField_10118}
Which is what i would normally use/works for me in when i'm making a request type. Or within a form.
Or are you saying this type of function isnt possible within automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Dave Nunn
In automation yo indeed can't reference custom fields based on using the lookup objects action in a rule
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.