The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Insight Force IQL to return one result

Xavier
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 Champions.
September 11, 2018

Hi all,

 

is there a way to force an IQL filter to return only one result (like a SELECT TOP 1 in SQL) ?

 

Thanks in advance.

Regards

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Aaron Williams
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 Champions.
September 11, 2018

Maybe you have seen the page already, but the documentation surrounding IQL is here: Insight Query Language

Your question is too vague for me to suggest anything yet, but maybe you can give a couple of direct examples of what you are hoping to achieve?

Off the top of my head, I can only think to suggest filtering with '>' (greater than)

I have a contact at Riada, so I'm asking them if this is a possibility!

Xavier
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 Champions.
September 11, 2018

Hi Aaron,

 

thanks for your quick answer.

I have no real exemple, but imagine a custom field of Insight Object Type in Jira with a list of name or code. When clicking, it suggest the complete list of objects available in Insight.

What I need is to have only one (randomly or not) object available and not the complete list (like a top 1 in SQL).


Regards,

Aaron Williams
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 Champions.
September 12, 2018

Hey Xavier, my contact got back to me with the following:

It is not possible to perform a "return top results" query, but you can achieve something similar with filtering and in general configuration; this will impact all results, however - this is under "default number of objects fetched in custom fields"

Essentially what he is telling me here is that it's not possible to perform a smart query; the example I gave him is to return most popular device model from a list of all devices, which I felt loosely translated closely to what you were asking!

Xavier
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 Champions.
September 12, 2018

Hi Aaron,

thanks for your assistance.
In fact, it seems the assignation works because the assignation took only the first object value.

thanks to you.

Regards

0 votes
vinay_sheel
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!
March 26, 2020

in JQL you can specify maxResults =1 

it will return 1 object

TAGS
AUG Leaders

Atlassian Community Events