Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties
hiddentrue


Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Page status

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



UI Text Box
sizemedium
typeinfo

Use case

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


Configuration

UI Steps
UI Step

Create a new Remote action in Jira administration > Manage apps > Remote actions.

UI Steps
UI Step

 Name the new remote action Get Tempo billable hours. 

UI Step

Select the POST method

UI Step

Select the current instance as the default connection.

UI Step

Enter the following REST path.

Code Block
languagebash
titleREST path
linenumberstrue
/rest/tempo-timesheets/4/worklogs/search
UI Step

Enter the following action body:

Code Block
languagebash
titleAction body
linenumberstrue
"{
  'taskKey': [
    '"+%{issue.key}+"'
  ]
}"
UI Text Box
typetip

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



UI Step

Create a new Calculated Number Field (by JWT) custom field.

UI Steps
UI Step
Name the calculated field Billable hours.
UI Text Box
typetip

Providing a description will help you to identify what the custom field does.


UI Step

Parser expression

Add the following expression:

Code Block
languagebash
titleMath expression for Calculated Number field:
linenumberstrue
toNumber(sum(toNumberList(executeRemoteAction("Get Tempo billable hours", "body[*].billableSeconds"),","))) / 3600





Related use cases

Page properties report
headingsField type, JWT feature, Label
sortByTitle
cqllabel = "calculated-field" and space = "JWTSDC" and ancestor = "27066672"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Field typeNumber
Parser functions

executeRemoteAction()

toNumberList()

sum()

toNumber()

Label