To learn more about Tempo products, please visit our Help Center. For support, see our Support Portal.

Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 2 Next »

Tempo Timesheets can only approve users' timesheets manually. For some customers, they can write up their own script to look for approval event when a user has submitted their timesheets, then “auto-approve” their timesheets with Server REST API.

\uD83D\uDCD8 Instructions

  1. 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 Server 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"
  }
}

Some other customers uses ScriptRunner to achieve it without writing their own script, which you can refer to our KB’s on Event listeners.

  • No labels