It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL 'distinct' or 'unique' clause

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

3 answers

2 accepted

1 vote
Answer accepted

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

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
1 vote
Answer accepted

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.

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

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
Shiva I'm New Here Sep 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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

314 views 1 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you