Jira API is returning duplicated tickets when running a query with large results

Paul Lucian Caunic July 1, 2021

Hello,

I am using python scripts to collect tickets from Jira. The number of tickets, I'm collecting, it's varying from 10.000 to 60.000. One thing, I noticed, when querying for tickets, via Jira API, it's that I get duplicated tickets. This wouldn't be a problem, but the number of unique tickets from Jira UI is greater than those returned by Jira API, and then I discovered that, some tickets are replaced, in the API response, with duplicates of some other tickets.

I'd like to mention that i use the same credentials for both JIRA UI and API, and I use the Jira pagination with a maxResult=50.

This issue is happening quite often, especially when i querying for large amount of tickets.

Do you have any idea what might be the reason for this ?

2 answers

0 votes
Daniel Turczanski - __JQL Search Extensions
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 2, 2021

Do you see duplicates on the same page? I yes, it's a bug in Jira.

If you see duplicates on 2 different pages then the ticket most probably changes its place between 2 page calls.

0 votes
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2021

@Paul Lucian Caunic Welcome to the community!

One quick suggestion would be to have a `order by` clause in your JQL query.

Paul Lucian Caunic July 6, 2021

I'm already doing that. but thanks to your suggestion, I'd like to try something different.

I'm thinking to order by ticker id, instead of updated date (which is the current order by clause), to see if I get a different result.

Suggest an answer

Log in or Sign up to answer