Rest POST Call not returning latest field values

Rajesh Bajya April 12, 2023

Jira rest POST call sometimes return old value(Not the updated one).
For example : Following Jira Epic was updated for Summary field.
Jira-Key : HCMTALENT-10494
Old Summary : CareerDev HomePage (Redwood) - 24A
New(Updated) Summary : CareerDev-24A-HomePageRedwood

The rest POST call to above Jira Epic sometimes return 'CareerDev HomePage (Redwood) - 24A' and sometimes return 'CareerDev-24A-HomePageRedwood'.Screenshot 2023-04-10 205418.pngScreenshot 2023-04-10 205337.pngScreen Shot 2023-04-10 at 7.55.19 AM.png

1 answer

0 votes
David Bakkers
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 12, 2023

Hello @Rajesh Bajya 

You're sending the queries to two totally separate and different instances of Jira.

In the screen grabs, one is 'jira.oraclecorp.com' and the other is 'jira.oci.oraclecorp.com'

Rajesh Bajya April 13, 2023

Hi @David Bakkers 

The rest calls via postman are on the same server instance(jira.oraclecorp.com). In one call, it is giving the new value and in another it is returning old value. 

Rajesh Bajya April 13, 2023

Screenshot 2023-04-10 205418.pngScreen Shot 2023-04-10 at 7.55.19 AM.png

David Bakkers
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 13, 2023

Hello @Rajesh Bajya 

What do you mean by "in one call" and then the data changes "in the other call". Do you mean two different REST API ENDPOINTS are being used for the calls or the same endpoint is being used at TWO DIFFERENT TIMES?

I find it very, very hard to believe that one REST API endpoint will return a different value of an Issue field compared to another endpoint if they are on the same Jira instance, since they are both looking at the same data.

If two different endpoints.... are you completely, totally, absolutely positive that the two REST API endpoints are giving different values for the same Summary field on the same Issue when you make the requests via those endpoints at the exact same time??

Rajesh Bajya April 13, 2023

Yes @David Bakkers 

 

Same endpoints is being used at two different times. Everything else is same, at one point of time value returned is correct(the latest value for the field) and at another time, we are still getting old value for the field(value before field was updated)

David Bakkers
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 13, 2023

You really are only providing half the information needed to be able to help. When you say "at another time" is that time BEFORE or AFTER the "one point in time"? IE

  1. When you check at 10am, the data is correct, then when you check at 11am, it is incorrect. OR
  2. When you check at 10am, the data is incorrect, then when you check at 11am, it is correct

Or when originally said "sometimes" did you mean "At random points in time the data randomly changes from one value to another value. Sometimes to the correct value, sometimes to the incorrect value"

When you look at the value of the summary field in that issue via the GUI at those times, does the GUI show the same results as the REST API and does that data change also show in the GUI?

In any case, something, somewhere is changing the data in that field between time A and time B, which is not the REST API's fault... it's just reporting that change as expected. You need to review the issue event logs and see what time the value of the summary field is changing and WHAT or WHO changed it.

Rajesh Bajya April 13, 2023

@David Bakkers 

Here is how this issue happened.

 

1. At 7 AM -> Summary of Jira EPIC was updated to value 'CareerDev-24A-HomePageRedwood' from 'CareerDev HomePage (Redwood) - 24A'. This update was done via GUI and not rest call.

2. At 8 AM -> When I queried the Summary field via REST POST call( I am using POST method to get the data, not updating anything), the rest call returned me value 'CareerDev-24A-HomePageRedwood' which is correct.

3. At 9 AM -> I made another rest POST call using same set of information used in step-2, this time I got value 'CareerDev HomePage (Redwood) - 24A'. Here is the issue, if both of my calls in step-2 and step-3 are using same endpoints, I should see same value for Summary field.

4. At 10 AM -> I made another rest POST call to get the data, at this point, I am not even sure if I will get OLD summary or NEW summary, because returned value is now pretty much random.

5. The actual value of Summary field was updated only once in Step-1, and it was done via GUI and not rest call. We are not updating EPICs via rest POST/PUT. 

 

6. The issue here is : why we are getting different results if we are using the same endpoints.

David Bakkers
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 13, 2023

Sorry, but you still didn't answer the questions I asked you.

1. When you used the GUI to look at the value of the summary field at 9am was it the correct value of 'CareerDev-24A-HomePageRedwood' or was it the incorrect value of 'CareerDev HomePage (Redwood) - 24A'? IE, is the GUI matching the REST API?

2. When you reviewed the event log of that issue, did you or did you not see that it was changed at 7am to the correct value AND NOTHING CHANGED IT THEREAFTER? IE there isn't a single solitary logged change to that issue's summary field between 7am and 9am.

Rajesh Bajya April 13, 2023

@David Bakkers 

 

1. Yes, the Summary was updated only once and GUI is showing correct values at all point of time. 

2. Event logs show one update, and after that nothing was changed. No trace of any update on Summary field after that.

David Bakkers
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 13, 2023

I think you should liaise with your Jira System Admins and your peers to have them double-check your work, as what you say sounds incredulous. I've never heard of any situation where the REST API reported the data in a field differently to what the GUI showed.

It's more likely you're omitting a vital piece of information, such as your organisation having multiple Jira Servers that are being synced or load balanced, and access is via something like DNS round robin, so you're not really querying the same SERVER, but a random one and just observing the difference in the data due to syncronisation lag.

Sorry, but I don't think I can help any further. Good luck with the problem.

Rajesh Bajya April 13, 2023

@David Bakkers 

 

This is not a one time issue, we are getting these OLD and NEW value for Summary field from last two weeks. 

1. I have an automated job to pull the data from jira, this job runs every hour. Now this job pulls correct data for few hours and then all of a sudden there comes one or two runs where it pulls incorrect data. This is not happening for all the epics in a project, the issue happens for only few of the epics, rest epics and their updates are going just fine.

Rajesh Bajya April 13, 2023

Thank you @David Bakkers for the input. 

Suggest an answer

Log in or Sign up to answer