Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

AQL ORDER BY by ObjectType

Mitch Springer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2024

Hello,

 

I'm trying to create a view on Confluence using the Assets macro that queries into Jira Assets using AQL and presents a view of several different ObjectTypeIds. A very basic example would be:

 

objectTypeId in (111, 222, 333, 444)

 

I'd like the result to be ordered / sorted by objectTypeId, instead of the default label. However if I do something like:

objectTypeId in (111, 222, 333, 444) ORDER BY objectTypeID

 

(I've also tried "Object type" or "ObjectTypeId")

 

I get no results (likely an invalid query). Is this even possible? It seems like it should be a fairly common task.

1 answer

0 votes
Gikku
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2024

@Mitch Springer This is expected as the 'order by' is meant for attributes only and not for object type. So you are performing an invalid AQL operation.

To meet your requirement, I would suggest creating multiple macros on the Confluence page separated for each object type and in the order that you want. This will give you the advantage of customizing the table according to the attributes available for each object type.

Mitch Springer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2024

I was afraid of that, but I guess in a way that makes sense. The other (also ugly) workaround I guess would be to create an attribute that holds the object type, and then just bulk update that. 

Gikku
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2024

If it is a one time task, the above workaround makes sense.

But if new objects are getting created frequently, then managing the new attribute can be a problem. Or, automation can be used to copy the name of the object type into the new attribute every type a new object gets created. 

Suggest an answer

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

Atlassian Community Events