I'm trying to import data from jira issues from multiple projects (via the rest api). In doing so I would like to keep track of what I've just imported. My naive attempt at this was to order the results "id" desc and on each run select the smallest id then run a query for id less than that value. However, id is resolved to a ticket key before sorting so only tickets in the same project as that id are returned. Here's a simple repro for this issue:
- Pick two issues from different projects, say PROJA-1 and PROJB-1
- Find their ids, say for these we have PROJA-1 has id 23000 and PROJB-1 has id 32000
- Try the jql: "key in (PROJA-1,PROJB-1)"
- RESULT: Correctly returns both issues
- Try the jql: "key in (PROJA-1,PROJB-1) and id<=32000"
- EXPECTED: Returns BOTH tickets since their ids are both less than this numerical value
- ACTUAL: Returns ONLY PROJB-1 since the id is resolved to this key first.