Search code examples
workfront-api

Is it possible to open Workfront closed PROJ or TSHET objects via the API?


I am in the process of integrating Workfront with my company's financial software and one of the processes we are trying to automate is the transfer of hours from one project to another in a scenario where hours need to be massaged for billing purposes. Generally, we are looking to transfer hours for a single user from one project to another. In cases where either the associated PROJ is closed or the associated TSHET is closed, is it possible to reopen these, at least temporarily via the API?


Solution

  • Sure, you can re-open them by changing the status. You can also subsequently re-close them once you're done with your tasks.

    For a timesheet, you'll just change the status to 'O' as follows:

    PUT https://<site>.my.workfront.com/attask/api/v9.0/TSHET/<uuid>?status=O&apiKey=<api key>
    

    For a project, you'll need to know what type of status you want to go back to (you may have a workflow such as new->open->in progress->implementing->testing->closing->closed and you want to go back to 'closing'. Find the 3-character key for that status and update the status as follows:

    PUT https://<site>.my.workfront.com/attask/api/v9.0/PROJ/<uuid>?status=<key>&apiKey=<api key>
    

    Closing them again would just involve setting the timesheet to C and the project to whatever its old status was.