Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL shows different results for the same query between same date

Ashish Kumar Gupta February 20, 2018

I am searching for JIRA IDs which have been updated between two dates and the query is -

https://pihjira.atlassian.net/rest/api/2/search?jql=project=projectid&updatedDate<="ToDate"&updatedDate>="FromDate"

The total number of IDs in response JSON string "total: ...." shows different number at different time. I would expect this number to be same. Can someone specify why this is not showing the expected result

Thanks!

2 answers

0 votes
Ashish Kumar Gupta February 20, 2018

Hi Warren,

Thank you for your quick help!

Yes - you are right. If any of the dates (to date and from date) happen to be current or future, I would expect changes to the results too. However, if both the dates are from the past (more than a day old, so time zones should not matter either), I would expect consistent results, based on the "update date".

For example, if I run the query between 2018-02-01 ans 2018-02-10 and these are I provide as issue updated date, the result should be same as both dates are more than a day old

Warren
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.
February 20, 2018

Let's say you run your query with those dates and you get back 20 items. An hour later, you again run exactly the same query, expecting the same results. But ... issue ABC-123 has now been updated by someone, which means it's updateDate is today, not within those dates. It won't appear in your list anymore, which means you're correctly getting a different result, even though the dates are in the past.

I hope this makes sense

Ashish Kumar Gupta February 20, 2018

Yes, this perfectly makes sense! Great, thank you again!

I understand now that the updateDate field works here like the latest updated date and not the all the dates on which issue has been updated.

Actually I was looking for all the JIRA issue IDs where only work logs of a given project have been updated between two dates. Here start date of the logged work could be any date. could you please help me to find out this if possible?

0 votes
Warren
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.
February 20, 2018

Hi Ashish

I'm not sure what you mean by "at different times". Do you mean running it at different times on the same day? On different days? Remember that your users are constantly making changes to issues, so each time you run this I would expect different results.

Possibly you need to give a more detailed example, because from this I don't see any unexpected problem

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events