JQL to return unique entries in custom field

Joshua Martin July 12, 2017

I currently have a custom "Labels" field that users will enter in multiple file names called Impacted Files.

I then use a search filter to bring issues into a JIRA Macro in Confluence where I have all columns removed except Impacted Files.

This works in that the files are listed, but they are now showing multiple rows of the same file name.

What I would like to do is display a list of these entries, but have it only list an entry once. 

1. How can I do this with my current setup? 

2. How can I do this in a better manner, displaying a list these Impacted Files? 

 

Thank you in advance

2 answers

1 accepted

3 votes
Answer accepted
Joshua Martin July 19, 2017

Andrew,

Thank you for your response and recommendations for the add-on. 

Even though it is a "workaround", I was able to add a JIRA Chart - Two Dimentional Filters with the Impacted Files as the YAxis (rows) and Sprint as the XAxis (the XAxis could be anything, this just produced the least amount of unneeded data), and I was able to have it list all files names just once, and put the count in the Sprint column. 

So while not handled through JQL, I was able to do so through the built in filter. 

 

 

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 19, 2017

JIRA's JQL is expected to return a list of JIRA issues.   So removing all the other columns can be done in that view, but the reason you still see multiple repeated values here are directly due to the number of JIRA issues with that filename.   I don't think that there is a JQL query you can use with JIRA to just return unique values like this.  


I'd recommend taking a look at this related post:  JIRA JQL Help Values exist in one or more - Atlassian Community

They explore that this is a limitation of what JQL can do, but then there are some other users that recommend trying to use a plugin such as SQL for JIRA Driver


Perhaps with the use of this plugin you can create a SQL query that would allow you to do a 'distinct' clause in SQL so that the query could return just one result for each unique name.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events