Search code examples
attask

Attask - set values to calculated fields


I would like to set values to plannedCompletionDate and projectedCompletionDate. I understand they are calculated fields from answer. My requirement is to update these fields with respect to a project. My code is as below

  `https://{exz}.attasksandbox.com/attask/api/v5.0/project/57cd--eaf1b824d3?projectedCompletionDate=1990-01-01&taskConstraint=MSO&apiKey=8ud---ky8j&method=put` 

I also tried

`https://{exz}.attasksandbox.com/attask/api/v5.0/project?ID=57cd--eaf1b824d3&projectedCompletionDate=1990-01-01&taskConstraint=MSO&apiKey=8ud---ky8j&method=put`     

But I get error as

"APIModel V5_0 does not support field taskConstraint (Project)"

I also tried replacing taskConstraint with projectConstraint, but end up in similar error. What constraint should I override to set values to projectedCompletionDate and plannedCompletionDate? Note -These are project properties and not task. Thanks in advance!


Solution

  • You can't set the projected dates at all, but you can manipulate the timeline engine to set them for you. Do do this through the planned dates, constraint type, constraint date, completion mode, and percent complete.

    It should be noted that you can't set anything on the project level but the one planned date that corresponds to the schedule mode of the project. Your calls are at the project level and therefore will not work. The project calculated planned and projected dates are rolled up from the tasks. You would need to set them there and then allow the rollups to happen.

    May I ask the business case and reason you need to manipulate these dates? We maybe able to find another solution that would be more straight forward.