JQL 'distinct' or 'unique' clause

Antônio Duarte May 31, 2019

The issues in my project have a text custom field named 'partner' whose content may be repeated several times.

Then, I would like to create a JQL expression where I could get a list with issues with different partners only (exactly as the 'distinct' filter on usual SQL), as below:

project=XPTO AND issuetype="report" WITH DISTINCT partner

If I have more than one issue with partner = 'Alfred', for me it doesn't matter which one is returned by the JQL. It is enough that only one issue is shown.

Is it possible?

Thanks in advance.

Antonio

5 answers

2 accepted

3 votes
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 4, 2019

Hello Antônio,

As @Earl McCutcheon mentioned, JIRA JQL does not have a way to limit the filter query to return a single result, as the Distinct parameter does in SQL language.

For now, here are the two easiest options you can use to achieve it:

1 - Export all your issues to CSV and then use a spreadsheet software (Like Excel) to remove all recurrent cells in the column.

2 - Use the SQL+JQL Driver plugin which provides you with SQL commands in your JQL queries - Only available for JIRA Server.

Additionally, feel free to vote and watch the suggestion below to increase its priority and also receive notifications about any updates:

"Distinct" qualifier in JQL

Let me know if you still have any questions.

Antônio Duarte June 5, 2019

Thanks, Petterson,

I voted for the suggestion, but this is not very encouraging. The issue was created on 2009...

Greetings.

Antonio.

Like # people like this
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2019

You are welcome, Antônio.

I agree this feature was requested a long time.

In fact, Atlassian prioritizes new feature implementations based on the number of customers affected (Votes) and some other factors, like what consequences it can bring to the application (Performance issues, incoherent behaviors, etc).

See: Implementation of New Features Policy

Since the request still needs more unique domain votes before being reviewed and the number of Atlassian customers is growing exponentially, I am optimist it's going to get some attention in the near future.

Have a nice Wednesday and let us know if we can help with anything else. :)

Like # people like this
1 vote
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 3, 2019

HI Antônio,

JQL in Jira has the ability to show values that include a search terms within defined criteria, but does not have the ability to leverage a distinct or unique clause for those values.

Check out the following question that was previously asked about with a discussion about a add-on that does have a possible workaround through extended JQL options that might work for you:

Regards,
Earl

Antônio Duarte June 3, 2019

Hi, Earl,

Thanks for your reply.

I had already noticed the mentioned question, but unfortunately, it doesn't fully fit my needs.

Greetings.

Antonio. 

Like Earl McCutcheon likes this
3 votes
Shiva September 14, 2019

Hi,

 

This is 2019, Do you have any thing done here? I have a same requirement where i need to show the report of distinct values in a similar way what @Antônio Duarte has mentioned!

 

Can you please suggest me how do i proceed further, definitely i am not going to export them to excel and do all the stuff as you mentioned, I need that to be done in JIRA.

 

Thanks

Shiva

2 votes
Carsten Schäfer December 11, 2019

helpful feature for us and i suppose for many other users.

naveena.mukthinutalapati May 20, 2020

Now in 2020 as well,  I have the same requirement to be able to have unique values in a column. Would greatly appreciate if  it can be handled using JQL.

 

Thank you, Naveena M

Like # people like this
0 votes
Steve Hodson May 17, 2022

You could create a dashboard with an Issue Statistics widget which groups by the Partner field. That would give you a list of all partners that have reports tickets and a count of how many each partner has. You could drill into those to get a list for each partner

Suggest an answer

Log in or Sign up to answer