Forums

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

Why does timetracking not get returned in my api call

Tim Foster
Contributor
September 10, 2024

I am trying (unsuccessfully so far) to get data from the API into Excel. I want to know three things, Original Estimate, Time Remaining and Time Spent.

If I use postman I can see the element under fields:

        "timetracking": {
            "remainingEstimate": "0m",
            "timeSpent": "6h",
            "remainingEstimateSeconds": 0,
            "timeSpentSeconds": 21600
        }
However, when I make the call in Excel, the timetracking element does not exist. I have looped through the keys using:

For Each key In JSON("fields").Keys
    Debug.Print key
Next

But it is not present in this set.

I have tried making the call to:

https://domain/rest/api/3/issue/KEY-123
https://domain/rest/agile/1.0/issue/KEY-123

Both work, but neither includes time tracking. I can happily get other elements json("fields")("status")("name") for example, or json("key") or json("fields")("summary"), but timetracking I cannot.

 

What am I missing? This is infuriating!

2 answers

0 votes
Tim Foster
Contributor
September 13, 2024

Anyone else got any ideas? It definitely should be there and it is there in postman

0 votes
Mohamed Benziane
Community Champion
September 10, 2024

Hi,

did you try json("fields")("timetracking")

Tim Foster
Contributor
September 11, 2024

Yes, I tried that, but the timetracking element doesn't exist so this fails

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events