You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Use case

Calculate the total billable hours logged with Tempo in the current issue.

Configuration

Create a new Remote action inand name it Get Tempo billable hours. 

Action body
"{
  'taskKey': [
    '"+%{issue.key}+"'
  ]
}"

You can optinal use the parameters from  ("YYYY-MM-DD") and to ("YYYY-MM-DD") to request only work logs in a specific time frame.

Select method: POST and Default connection: Current instance

REST path
/rest/tempo-timesheets/4/worklogs/search




Create a new Calculated Number Field (by JWT) custom field and name it properly.

Providing a description will help you to identify what the custom field does but this step is optional

Parser expression

Add the following expression:

Math expression for Calculated Number field:
toNumber(sum(toNumberList(executeRemoteAction("<NAME OF YOUR CREATED ACTION", "body[*].billableSeconds"),","))) / 3600
more info...

To achieve this, the following functions are used:



If you still have questions, feel free to refer to our support team.