Tempo API calls for workedHours - unusual data hierarchy

simone.croft March 30, 2021

Hi, 

I'm trying to pull Tempo data using an API call (https://{JIRA_BASE_URL}/rest/tempo-planning/1/api/folio/{folioId}/team) and am struggling to get the workedHours data from the return.

I'm getting a return for the following data items which is what I've come to expect from Jira: 

$success$members$kind

$success$members$id

$success$members$folioId

$success$members$name ... etc., but when it comes to the hours worked, it looks like this: 

$success$members[[3]]$workedHours[[61]]
$success$members[[3]]$workedHours[[61]]$startDate
[1] "2021-03-28"

$success$members[[3]]$workedHours[[61]]$endDate
[1] "2021-03-30"

$success$members[[3]]$workedHours[[61]]$effort
[1] 10

$success$members[[3]]$workedHours[[61]]$otEffort
[1] 0

What I really need to get is a sum of all hours spent (i.e., $success$members[[3]]$workedHours[[61]]$effort) for each employee on each folio but I can't quite understand how to get around this different hierarchy of data. 

I'm using R for my scripting but any help would be greatly appreciated. 

1 answer

0 votes
simone.croft March 30, 2021

Just to follow up on this question, here is a more straightforward view of the hierarchy: it looks like there are 61 lists of 4 within the workedHours list - what I need is to be able to get these all into one dataframe where I can aggregate a total per team member per folio. 


workedHours Jira.PNG

Suggest an answer

Log in or Sign up to answer