Users' timesheets can be approved only manually in Tempo Timesheets can only approve users' timesheets manually. For some customers, they can write up , 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 Server the Data Center REST API. Some other customers uses ScriptRunner to achieve it, which you can refer to our KB’s on Event listeners.
\uD83D\uDCD8 Instructions
The timesheet approval event casts an object with the following parameters:
Code Block |
---|
{
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 Server the Data Center REST API, you can run this POST http://localhost:8080/rest/tempo-timesheets/4/timesheet-approval
Code Block |
---|
|
{
"action": {
"comment": "This is my comment.",
"name": "approve",
"reviewer": {
"key": "jeanDoe"
}
},
"period": {
"dateFrom": "yyyy-MM-dd"
},
"user": {
"key": "johnDoe"
}
} |
Info |
---|
Highlight important information in a panel like this one. To edit this panel's color or style, select one of the options in the menu.Customers also use ScriptRunner to achieve this without writing their own script - refer to our KB’s on Event listeners. |
\uD83D\uDCCB Related articles
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@957 |
---|
showSpace | false |
---|
sort | modified |
---|
showSpacetype | falsepage |
---|
reverse | true |
---|
type | page |
---|
cql | label = "labels | kb-how-to-article |
---|
cql | label in ( "api" , "events" , "approval" , "timesheet-approval" ) and type = "page" and space = "KB" | labels | kb-how-to-article |
---|
|