We have an integration with a HR Leave Request system and we're having trouble injecting worklogs into weeks that have approvals. Prior to a week being submitted and closed, it is possible to insert a new worklog into a users timesheet for that week, but after it is closed this becomes impossible.
We would like the ability for an authorised service account to alter the approval state of a week of leave for a particular user so that if a new leave request is made for a week of work that's already been approved - it can automatically be re-opened, adjusted, and resubmitted. Currently the Rest API only allows submitting/revoking approval weeks for the user the executing the call (api/rest/me), and it has no endpoints for re-opening an already approved timesheet, or approving a submitted timesheet.
Example endpoint that would satisfy this:
post /api/rest/timeapproval/setstate
Params:
- userId
- weekStart
- newApprovalState (eg. 'closed', 'submitted', 'unsubmitted')
- assignedManagerId (when newApprovalState is 'unsubmitted' this has no effect)
-
Hello Mikeal,
Thank you for getting in touch and sharing your use case. We already have a similar request in our community regarding the ability to reopen timesheets via API for making adjustments on worklogs - I encourage you to support it with an upvote! However, as of now, this request hasn't gained significant traction within our community for us to incorporate it into our plans. If this changes in the future, we will certainly reassess the situation. I apologize for not having better news to share at the moment. Rest assured, we will keep you updated if there are any developments.
Best regards, Nici
Please sign in to leave a comment.
Comments
1 comment