Insight custom field does not support order by?

Pieter Wouter Hartog
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2022

I created an Insight custom field called 'System' that should display and select objects with object type 'System' (a custom schema and object type).

When I enter just this (no order by clause) it works fine:

  • Filter Scope (IQL): objectType="System" 
  • Filter Issue Scope (IQL): objectType="System" 

But when I add the 'order by' clause (I tried multiple attributes), the drop down does not return anything ('no options avalable' and a popup screen on the botrom right informs me it didn't fetch results'

  • Filter Scope (IQL): objectType="System" ORDER BY Name ASC
  • Filter Issue Scope (IQL): objectType="System"  ORDER BY Name ASC

The same IQL query runs fine when I use it as a filter in the Insight screen itself. So the syntax is correct. It's just that adding the 'order by' clause is causing it to fail in the custom field?

Any ideas if this is a bug or am I doing something wrong?

 

2 answers

1 accepted

0 votes
Answer accepted
Pieter Wouter Hartog
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 19, 2022

I contacted support and they confirmed there is a known bug in Jira Cloud for this: https://jira.atlassian.com/browse/JSDCLOUD-9885

Please vote for this bug when you experience this issue as well.

0 votes
David Sumlin
Contributor
June 28, 2022

Unless you're going to filter your values in the custom field based on values from the issue, you don't need the Filter Issue Scope (IQL).

After that, you should be able to add the ORDER BY clause to the Filter Scope (IQL).

Pieter Wouter Hartog
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2022

Thanks for your reply @David Sumlin 

For another field, I do need the Issue IQL to filter on field values in the issue, but for now I'm just trying to make the ORDER BY work.

I tried the following combinations and all have the same result (no options in the dropdown and a popup screen says 'didn't fetch results'):

attempt 1 (from my original post):

  • Filter Scope (IQL): objectType="System" ORDER BY Name ASC
  • Filter Issue Scope (IQL): objectType="System"  ORDER BY Name ASC

attempt 2:

  • Filter Scope (IQL): objectType="System" ORDER BY Name ASC
  • Filter Issue Scope (IQL): none

attempt 3:

  • Filter Scope (IQL): objectType="System" 
  • Filter Issue Scope (IQL): ORDER BY Name ASC

Do you have an example where the ORDER BY works?

David Sumlin
Contributor
July 14, 2022

@Pieter Wouter Hartog , is it possible that the label identifier/tag is on a different attribute than the Name attribute? I'm assuming you're displaying the objects in the custom field using the label attribute. 

Normally, I put my ORDER BY clause in my Filter Scope (IQL) and it works as expected. (e.g. objectType = "Domain" AND Status = Active ORDER BY label)

Pieter Wouter Hartog
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2022

@David Sumlin Thanks for your example.

You are also working with JSM Cloud?

The exact same thing doesn't work for me; as soon as I add the ORDER BY clause in any of the two fields, the IQL stops returning anything.

I will log a ticket with Atlassian to see what's going on.

David Sumlin
Contributor
July 15, 2022

Ahh, I'm on Server/DC, so maybe it's different there.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events