Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Include Page
Tempo for Data Center Header
Tempo for Data Center Header
Page Properties

Question

How do I bulk create worklogs for a period of time

Answer

Worklogs can be created for a period of time by using a Tempo REST API. This can be handy when internal activities like vacation or paternity leave entered and maintained in a third-party application should be duplicated to Tempo/Jira. The Tempo REST API that we will need to use is:

{YourJiraUrl}/rest/tempo-timesheets/4/worklogs

For the API call, you need to use the POST method. The payload should be something similar to:

{

"timeSpentSeconds":

12600,

"billableSeconds":

3600,

"started":

"2022-02-11",

"endDate":

"2022-12-31",

"comment":

"creating

worklog

with

REST

API",

"worker":

"JIRAUSER11000",

"originTaskId":

"WIKK-13",

"remainingEstimate":

59400,

"attributes":

{

"_Color_":{

"value":

"yellow",

"key":

"_Color_"

},

"_Account_":

{

"value":

"201404",

"key":

"_Account_"

}

}

}

The “attributes” section refers to additional work attributes that you might have configured in Tempo. You can skip this section if you do not have any attributes defined. 
For more information, please take a look at https://www.tempo.io/server-api-documentation/timesheets?hsLang=en#tag/Worklogs/operation/createWorklog.