Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,465,148
Community Members
 
Community Events
176
Community Groups

How can I remove duplicated issue keys from a query result

Hi all,

I'm trying to run the following query, but I'm getting The issue key 'Duplicate' for field 'issuekey' is invalid.

project = <project_id> AND component = <component_id> AND ("Traceability Relevant" = Yes OR labels = <label_name>) AND status != Inactive AND (fixVersion != <v1> AND fixVersion != <v2> AND fixVersion != <v3> AND fixVersion is EMPTY) AND issuekey != Duplicate

How can I remove duplicated issue keys in the query result?

Also, I tried to use != and !~ in as a list to have a clean query, but it's not accepted: Operator '!=' does not support the list value '("v1", v2","v3)' for field 'fixVersion'.

I'm using Jira v7.13.8

Thanks!

2 answers

0 votes

You say "I need to remove duplicated issue keys [from a search result]"

Actually, no, you do not.  Jira already de-duplicates the list.   You are not getting the same issue key in the results.

The only way you might, which is rare, is when you have a very badly damaged index.  If that is the case, you desperately need to find out what is corrupting it, fix that, then run a full locking re-index.  Your duplicates will then vanish from your search results.

I'd be interested to see a screenshot of what is making you think you have duplicates.

Hi Clarissa

Providing you use the resolution to mark issues as duplicate, you can use: 

resolution != Duplicate 

Note: Many times the != operator needs to be combined with 'or myfield is not empty', if you can have empty values.

 

If you want to use list values in the query, you need to use the 'in' statement:

fixVersion in ('v1','v2')

 

Hope this helps, for more, read:

https://www.atlassian.com/software/jira/guides/expand-jira/jql#advanced-search

Hi @Leonard Chew , 

I need to remove duplicated issue keys, not by duplicated resolution field.

I want to use a list that is not in that I already tried without success. 

Unfortunately, your suggestion didn't work for me.

The issue key is unique. It is very, very unlikely that you have duplicate issuekeys.

What makes you think you have duplicate issuekeys?

Is there JQL syntax which post-processes a query fragment to remove duplicated column values? For example: `project = MINE and assignee order by assignee UNIQ`

or something like that.

No.  JQL returns a list of issues that matches the question of "what issues match these criteria".  It has nothing to say about what you report on or how.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events