Chox’s Blog

Chox juga mau belajar nge-blog

Category Archives: Enterprise Project Management

Cannot Add New ‘Completed’ Task With PSI

I’m facing a case that I cannot add task with 100% progress (completed task) with PSI programmatically.

I need to import/sync tasks from another system to Project Server. The task include some custom fields. There is no problem, if I add tasks when the property %complete is less then 100% (not complete). But if there is a task with 100% complete exist, after do QueuePublish method at the end, nothing has changed to the project. All tasks have not added to the project.

After a few hours trial-and-error, I still cannot found the solution.

Then I do some cheating flow, that I add/insert the task directly to the database. Of course Microsoft not recommend this way. But it works for me.

Some property and value that I have to inject manually to database (table Draft and Published) :

  1. Task_Pct_Comp : 100
  2. Task_Pct_Work_Comp : 100
  3. Task_Act_Finish, equals to Task_Finish_Date
  4. Task_Stop_Date, equals to Task_finish_Date
  5. Task_Act_Dur, equals to Task_Dur

That’s it.. When opening project in Project Center, I can see the task has completed with thick mark at the left column 😉