gadget jira tempo

marco sa April 21, 2014

Hello, I am trying to create a gadget for jira, in which I want to show the time required tempo, that service should utlilizar, I added this dependency:

<dependency>
<groupId> com.tempoplugin </ groupId>
<artifactId> tempo-core </ artifactId>
<version> 2.0.7 </ version>
<scope> provided </ scope>
</ dependency>

Would I would serve with this? that service would have to rely for the time required.

Thank you

6 answers

0 votes
Raghuraman Varadarajan May 29, 2014

0 votes
Raghuraman Varadarajan May 29, 2014

this is my Tempo core jar from which the methods are exposed for the AccountService interface. The methods from the JAR for Account Interface in my Java Project are shown in the image after the first question at the top of the page

0 votes
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 22, 2014

Hi Marco,

As you have managed to figure out, Required workload can be found by using the UserScheduleManager (however this isn't a public API, and we make no promises to support those methods in the future, so you use them at your own risk).

As of Tempo 7.9 (due in about two weeks) the plans from Tempo Timesheets and Tempo Planner will be available using the AllocationService in the Tempo Planning API plugin (tempo-plan-core). The same warning applies here (not officially public, nor supported and you might have to do some digging around to figure out how to get exactly what you need.)

Getting the actual hours worked, might prove more difficult. Tempo Timesheets doesn't offer an API for that.

I encorage you to create a new feature request (http://tempoplugin.jira.com) and ask us to make publicly available these three stable API's: Required, Planned, Worked. I am sure it would be looked favourably upon.

Raghuraman Varadarajan May 29, 2014

I am using the below code but it does not even recognize AccountService Interface from com.tempoplugin.account.service

My plugin works fine without instantiating AccountService

When I remove the code for getting accounts and just instantiate the AccountService my plugin fails with a 404

Are the Java API's for Tempo not PUBLIC?

My java code and pom are as below

REST CLIENT CODE

-----------------------

@GET

@AnonymousAllowed

@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})

public Response getProjects(@Context HttpServletRequest request)

{

String username = userManager.getRemoteUsername(request);

ApplicationUser user = userUtil.getUserByName(username);

User dirUser = user.getDirectoryUser();

Collection<TempoRepresentation> tempoRepresentations = new LinkedList<TempoRepresentation>();

List<Account> accounts = accountService.getAccounts(dirUser);

for (Account account : accounts)

{

tempoRepresentations.add(new TempoRepresentation(account));

}

TemposRepresentation allAccounts = new TemposRepresentation(tempoRepresentations);

return Response.ok(allAccounts).build();

}

POM.XML

-------------

<dependency>

<groupId>org.tempoplugin</groupId>

<artifactId>core</artifactId>

<version>7.4.3.2</version>

<scope>provided</scope>

</dependency>

<dependency>

<groupId>com.tempoplugin</groupId>

<artifactId>tempo-core</artifactId>

<version>2.0.9</version>

<scope>provided</scope>

</dependency>

<dependency>

<groupId>com.tempoplugin</groupId>

<artifactId>tempo-teams</artifactId>

<version>2.2.0.4</version>

<scope>provided</scope>

</dependency>

0 votes
marco sa April 22, 2014

Hello,

exactly what I need, is to get the planned and Requiered times to display associated with each worker (apart from other data that are not tempo), are very similar gadget that provides tempo (capture). But no use to us, because we want to show a lot more data.

Default Tempo Team

<th> </th><th>Name</th><th>Required</th><th>Planned</th><th>Worked</th> <tfoot> <th colspan="2">Total:</th><th>352</th><th>48</th><th>16</th> </tfoot>
Marco 176 48 0
Reportador 176 0 16



I managed to get time Required as follows:
userScheduleManager.getRequiredSeconds (user, Pair.of (LocalDate, LocalDate));

but I lack the time planned, is there any way you could get by user

Thank you, Regards

0 votes
Kristin Hreinsdottir [Tempo] April 22, 2014

Hi marco

I am not exactly sure what you want to accomplish with this gadget. Maybe you can explain that better. There is currently no public java API in Tempo to do this, you can browse the available REST services in Tempo through the REST API browser but I don't think they will provide everything you need. This sounds like something Tempo could offer. I suggest you file a feature request here: https://tempoplugin.jira.com/.

Kind regards

Kristín

0 votes
marco sa April 21, 2014

would need to obtain three times: Required, Planned and Worked

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events