Workfront: Forcing project 'Recalculate Finance' operation from API

时间:2018-02-01 18:04:28

标签: attask workfront-api

I bet this falls on deft ears...

I'm working on a application that uses the workfront api for automating custom price calculations of project tasks.

The idea here is to obtain the list of tasks, apply certain business rules to each to calculate the pricing/revenue/etc., and then push these values back to the tasks in the respected workfront project.

Problem is, when you now open the project directly in workfront, the changes from this interaction are present until you perform a manual:

enter image description here

while what I would prefer is this is done already without having to do this since the user would not have any reason to believe it was necessary (they didn't make any manual changes to the tasks through workfront directly, why would they think otherwise?).

Some time ago I stumbled on a hint that toggling the project to "Current" will force the recalc, but I've done this through the API (I save the original state, change it to "CUR" and toggle it back to the original state since I can't leave it a "CUR") but this has no effect.

Any ideas on how I might be able to force this behavior?

1 个答案:

答案 0 :(得分:0)

It did indeed fall on deft ears.

PUT https://[base_url].my.workfront.com/attask/api/v9.0/proj/[UUID]?action=calculateFinance&apiKey=[api_key]