JQL search by issueId fails if issue key LIST has a deleted issue

Shailesh Shailesh November 14, 2011

I have a need where I need to get the list of issues remotely via their key. If one of the key corresponds to a deleted issues, entire JQL fails.

JQL: key in ("PROJ-1", "PROJ-5)

I also tried (with no luck)

key = "PROJ-1" or Key = "PROJ-5"
key in ("PROJ-1") OR key in ("PROJ-5")

I would expect that it should ignore the key that doesnt exist (like SQL). But in this case, entire JQL fails.

-Shailesh

4 answers

1 accepted

7 votes
Answer accepted
Neha Sharma March 8, 2018

Too late to post a comment on the thread, but it can be helpful to someone. So here's my observation -

I faced the same issue while making JIRA API calls using JQL. Where it should have returned results for valid keys, but it returned an exception if any issueKey was invalid.

However, I noticed something strange. When we make the same JQL query and use lowercase for the keys, e.g "abc-1" instead of "ABC-1", it gives results instead of the exception.

Leirbag Assuab January 31, 2019

Never too late to save the day to the others! Thanks for your workaround!

Nikolai January 31, 2019

Thanks for the workaround! Better late than never. ;-)

Mike Kessler April 29, 2020

you've got to be kidding me

 

great answer, thanks Neha!

Kevin Coulson June 18, 2020

Works perfect, what a bizarre bug/feature! Thanks

0 votes
Zephyr QA May 20, 2021

convert  comma separated list  into lower case then it will work properly 

It will return non deleted key in result.

use like as below and try any one

JQL: key in ("proj-1", "proj-5")

JQL: key in (proj-1, proj-5)

 

I hope you will get answer.

0 votes
Sander Brienen [Avisi]
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.
November 14, 2011

How does the query fail? Does it give an exception, or just no results? I would also expect Jira to ignore the non-existing issue key.

This might be a bug in Jira. I would suggest that you file a issue at support.atlassian.com to check with Atlassian's support team.

Shailesh Shailesh November 14, 2011

No Exception, It comes back with appropriate key not found message. I would except result containing all the found ones.

0 votes
Sander Brienen [Avisi]
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.
November 14, 2011

How does the query fail? Does it give an exception, or just no results? I would also expect Jira to ignore the non-existing issue key.

This might be a bug in Jira. I would suggest that you file a issue at support.atlassian.com to check with Atlassian's support team.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events