Users' timesheets can be approved only manually in Tempo Timesheets, but the process can be automated. Some customers write their own script to look for an approval event when a user has submitted their timesheets, and then “auto-approve” their timesheets with the Data Center REST API .
\uD83D\uDCD8 Instructions
-
The timesheet approval event casts an object with the following parameters:
{
id=108,
userKey=beverly,
actorKey=john,
reviewerKey=john,
status=approved,
period=0121,
dateFrom=2021-01-01,
dateTo=2021-01-31,
periodType=BILLING,
periodView=PERIOD,
reason=Great job!,
workedTime=0,
submittedTime=0,
requiredTime=576000,
action=approve
}
2. With the Data Center REST API, you can run this POST http://localhost:8080/rest/tempo-timesheets/4/timesheet-approval
{
"action": {
"comment": "This is my comment.",
"name": "approve",
"reviewer": {
"key": "jeanDoe"
}
},
"period": {
"dateFrom": "yyyy-MM-dd"
},
"user": {
"key": "johnDoe"
}
}
Customers also use ScriptRunner to achieve this without writing their own script - refer to our KB’s on Event listeners .
\uD83D\uDCCB Related articles
- Best Practices for Tempo Cloud REST API
- Tempo Data Center API
- Can I use the JIRA OAuth authentication for Tempo Data Center REST APIs
- Where can I learn more about your APIs?
- Creating worklogs for a period of time using the Tempo REST API - Data Center
- Import worklogs using the Tempo REST API on Data Center
- Import plans using the Tempo REST API on Data Center
- Username changed but it does not update in Timesheet and in REST API's (Data Center)
- Changes to our REST API (Cloud)
- Managing Worklog Limits for Reporting (Data Center)
- Timesheet approval REST API on Cloud and Servlet API on Data Center
- API's
- How Tempo handles Jira user changes
- Different ways to log time with Tempo and Jira
- Username does not appear in the export anymore, why is that?
- Creating Tempo Plans from a Jira Sprint on Data Center
- Data Center API - Updating workload schemes using a spreadsheet and the command line with private endpoint
- Data Center API Error: "Missing value for the required work attribute 'xxx' "
- Creating a worklog with work attributes using the REST API
- Username field missing from REST results and exported reports (Cloud)
- Changes made to the Jira SPI in Tempo Timesheets version 10.19.0, Tempo Planner 7.19.0 and Tempo Budgets 13.19.0
- Generic Resource private API's on Data Center
- "Invalid grant" error when using the Tempo Cloud REST API
- Timesheet Approval Notifications
- The Approval Button is Missing in Teams Timesheets (Cloud)
- Timesheet approval "auto-approve" script on Data Center
- Timesheet approvals for inactive users
- Time entry approval workflow
- Timesheet Approval Event listener
- Timesheet Approvals