Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I determine users' required hours via Tempo Timesheets API?

Anson Hoyt
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 7, 2014

I've read the Tempo Servlet Manual, but don't see a means of getting a user's required hours within a date range. For example, I want to see that John Doe has 168 required hours for January 2014 because his Workload Scheme is 8 hours M-F and his Holiday Scheme gives him both January 1st and January 20th off.

Option 1

Is there a way to query this directly? Is there a pending feature request I can vote for?

Option 2

Is there a way to calculate it with data that is available?

  • I only have one Holiday Scheme, so could rely on /plugins/servlet/tempo-holidayList and some extra calculation to come up with the applicable holidays
  • I have two Workload Schemes, and don't see a way to query this data. This comment suggests calling GetWorklogs with the addUserDetail parameter can return Tempo.hoursPerDay, but that doesn't work for me.

Is there a way?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Benedikt Bjarni Bogason [Tempo]
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 7, 2014

Hi Anson,

Take a look at the (currently non-public, but fairly stable) UserSchedule-java-api:

com.tempoplugin.core.userschedule.api.UserScheduleManager, which among other has this method:

getRequiredSeconds(User user, Pair<LocalDate, LocalDate>duration), where duration is a pair of LocalDates (fromDate, endDate) where fromDate is inclusive, but endDate is exclusive.

This takes both the workload and holiday scheme into account when calculating the required seconds.

Hope this helps!

Anson Hoyt
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 9, 2014

Is this only available via Java, which I presume requires I write a JIRA plugin to expose it to my separate web application? Or is this exposed to HTTP requests?

Benedikt Bjarni Bogason [Tempo]
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 10, 2014

Hi

Currently we haven't made a REST endpoint out of this, I am afraid.

However, creating a simple plugin that exposes the api to HTTP requests should be trivial for experienced plugin-developers.

You might be interested to know that Tempo Planner has done something similar to your request (but that is not a public REST endpoint, and could therefore change at anytime without notice). If you want to check it out, you could get a Tempo Planner trial, and check out this URL:

http://localhost:2990/jira/rest/planner/1/team/1/members?from=2014-01-01&to=2014-02-02

Anson Hoyt
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 23, 2014

Thanks for the tip on how I can get this today. I've voted the issue that appears to track a Tempo-implemented solution, TT-386

Jigar Patel January 26, 2018

What is the value of localhost:2990 for my tempo account? I am desperately looking for  tempo api which gives the required hours of team members.

 

Please do needful.

TAGS
AUG Leaders

Atlassian Community Events