As a general guideline we always want to search for an ID instead of a Name whenever we have a function that is intended for long-term / systemwide use.
For example a general JQL query on a custom field with id 12345 could be cf[12345] = searchitem
Is it possible to do the same for AQLs?
Example:
Attribute Name: Status
Attribute ID: 1670
AQL: Status = Operation would be the standard way but instead we would like to use id[1670] = Operation or similiar function just as we can do for JQLs
Placeholders (https://support.atlassian.com/jira-service-management-cloud/docs/use-placeholders-to-replace-information-depending-on-context/ ) looks as if it might be possible to use ids. But i cannot get that to work in AQLs
Anyone have any information about this?
Just facing the exact same issue here - using attributes' names in REST's aql but creating / updating objects values with attribute' ids is kind a strange.
Hi,
I think that you need to turn your attribute into an object if you want to use it this way.
Then the AQL syntax would be something like this:
"Status" IN ("PH-1670")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately there is no way to use the attribute ID in the AQL search. You need to use the name of the attribute (with exact spelling).
Placeholders may only be used for inserting values from for example custom fields on the right hand side of the expression.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What's the syntax of the AQL query to search based on an attribute name then?
Is that documented anywhere for undeprecated calls?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, I've found "attribute name with space" = my_value
but what about searching for an asset with a specific object Id.
This seems to work at the top level but I have objects used as items for attributes and objectId = xxxx does not seem to return values for those sub-objects. Are they referenced in a different syntax?
Both objects appear in the GUI
/jira/servicedesk/assets/object/11021 for the high level object, and
jira/servicedesk/assets/object/11191 for the low level object
but objectId = 11021 returns object 11021 whereas objectId = 11191 doesn't return anything
Ultimately, I'm trying to figure out the correct syntax for getting an API call to collect info about that lower level asset so that my API queries don't have to collect large volumes of high level object data with lots of unnecessary content
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.