JQL with non-existing id inequality fails

The following JQL fails:

project = <projectId> AND id >= 1 ORDER BY id DESC

Error: Issue does not exist or you do not have permission to see it.

Do not understand why it fails - I do not need to access issue id = 1, I just want to find all issues in the project <projectId> with id greater then 1 (or any other number). Is there any way how to compare issue id for non-existing id?

Use case: I want to use id for paging instead of startAt because such paging is more robust to concurrent changes when I need to process all issues in the project. It works this way:

  1. read 100 issues project = <projectId> ORDER BY id DESC
  2. process the issues
  3. read next 100 issues: project = <projectId> AND id >= <lastIssueId> ORDER BY id DESC and go to processing (2.) again.

It works well unless the last issue from the page is deleted concurrently, so the <lastIssueId> does not exists, then it fails with the above error.

1 Like

Agreed, this should work. You can watch and vote for this bug.

PS. I also prefer “seek pagination” over “offset pagination”, good use case :+1: