Is there a way to search individual issues along with an issue range within the same query?

Nikhil_Gupta August 1, 2019

I want to search issues like, PR-104, PR-205, PR-1032 along with issues in the range PR-134 to PR-140 with a single query.

I want to be able to express the range in such a way that it can come in a comma-separated manner along with individual issues.

Something like this:

id in (PR-104, PR-205, PR-1032, PR-134 to PR-140)

I generally list down the relevant issues in Excel. When I have to search them in JIRA, I just concatenate them with a comma in between. It works like a charm! But this ticket range makes it difficult for me to do that. Hence, the query.

2 answers

2 accepted

1 vote
Answer accepted
Michael Wohlgemuth
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.
August 1, 2019

Hey @Nikhil_Gupta 

this is what worked for me:

issuekey in (PR-104, PR-205, PR-1032) or (issuekey >= PR-134 and issuekey <= PR-140)
Nikhil_Gupta August 1, 2019

Thanks @Michael Wohlgemuth 

That surely would work. However, as I have mentioned in the description, I am looking for a way to have all items comma-separated. 

I generally list down the relevant issues in Excel. When I have to search them in JIRA, I just concatenate them with a comma in between. It works like a charm!

But this ticket range makes it difficult for me to do that. Hence, the query.

Michael Gold November 30, 2022

In this part here, why aren't there any quotation marks used? How do you address the spaces between each issue?

 

issuekey in (PR-104, PR-205, PR-1032) 
0 votes
Answer accepted
Ignacio Pulgar
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.
August 9, 2019

Hi @Nikhil_Gupta,

The syntax specified by @Michael Wohlgemuth is the correct one.

So, what you may need here is a more sofisticated JQL query builder, like this one I've just created for you.

The cells that are supposed to be edited are the ones with light yellow background color.

Multiple issuekey ranges are supported, even those with just one limit (ie: just a FROM or just a TO).

Feel free to make a copy of the spreadsheet.

Hope it helps!

Best regards.

Nikhil_Gupta August 9, 2019

Thanks @Ignacio Pulgar

Appreciate you took the pain to create this spreadsheet for my query. Thank you :)

Yes, this would do the trick. I was looking for some quick trick within JQL itself but I guess that might not be possible.

 

Regards,

Suggest an answer

Log in or Sign up to answer