Forums

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

JQL Distinct or Unique query filtering by latest date

Shakir Islam September 21, 2021

Hi All,

I'll looking to produce a jquery where I can make the "Reporter" field values unique (therefore a name only shows up once) and in the case of duplicates, the ticket which has a later 'Created' date is shown (AKA the most recent ticket is only shown). 

Would appreciate any assistance with this issue. 

Thanks!

1 answer

0 votes
Radek Dostál
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.
September 21, 2021

Hi Shakir,

 

JQL does not support distinct parameters (or limit for that matter). My understanding is that you would need to write your own jql function (which would inevitably internally first get the whole issue collection, but then only return you the last one in sorted order), or limit the amount of issues returned from your search by some arbitrary limitation. E.g. remotely with REST you can limit the amount of issues returned - which would satisfy your requirements, but I don't believe that you can do this directly in the web UI without affecting the entire instance for everyone else.

So in my opinion it needs a custom jql function to only return a single issue per parameter(reporter), but then again I've not crossed this idea before so maybe there is another way. What is the use case though, maybe there's another way to get there?

 

//R

p.s. jQuery is a javascript library

Suggest an answer

Log in or Sign up to answer