ID in list of wrong values

tahay November 12, 2019

I'm trying to get the list of issues with a given list of IDs, this list contains some correct IDs and wrong ones

for example, I have issues with the IDs 10010 and 10012

when I execute this jql:

 ID in (10010,10012)

I get good results, but when I execute this jql 

ID in (10010,10012,44560) 

I get an error saying 

"A value with ID '44560' does not exist for the field 'ID'"

is there any way to make it work ? 

1 answer

0 votes
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.
November 23, 2019

Hi tahay,

I'm curious, what's the purpose of asking for IDs that might not exist?

Regards

tahay March 30, 2022

Hey 
so sorry for the delay, I completely forgot that I've created this question, 

I'm creating a python application to integrate JIRA with a personal bot, this bot already have the list of projects defined manually, and when something is defined manually by a human it can be wrong.

Best regards.

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.
April 7, 2022

Not only that, issues can be deleted as well over time...

Why would you need to hardcode issue ids?

If anything, it would be better to programmatically query the issues you are interested in collecting in a different way, like looking for the presence of a label:

labels = my-script

Or maybe even better, depending on your exact use case, you may vote for those issues you are interested in collecting:

voter = currentUser()

The vote option has the advantage that no one else except the user who added the vote can edit that.

Both options will allways work, no matter if an issue were deleted.

Hope it helps.

Suggest an answer

Log in or Sign up to answer