I am using ReadStatusTimephasedData method to read the actual and planned hours per day for all the tasks. I achieve this by looping through all the resources and all their assignments and using impersonation. For some assignments the resulted StatusingTimephasedActualsDataSet dataset contains a TaskUID that is not matching the ASSN_UID passed as a parameter and I cannot event find this TaskUID in the database. Because of this issue I am not able to link the results with the Tasks table. I cannot find any difference between the assignments for which the method returns correct data and for the ones that it doesn't. Please tell me if I'm doing something wrong or if there is another way to get the actual and planned hours per day using PSI.
I figured out what was causing the method to return wrong Task_UIDs. This issue happens only for the booked hours that are not approved yet by the project manager. When the assignment owner or resource makes changes to the assignment, the changes are kept in the saved assignment table. In this table (MSP_ASSIGNMENTS_SAVED) the Task_UID field has a different value than in (MSP_ASSIGNMENTS) and this is the field value returned by the ReadStatusTimephasedData. Only when the assignment owner or resource publishes the changes, the updated assignment is copied to the updated assignment table and ReadStatusTimephasedData will return the real Task_UID. Here is a link with the Status update life cycle: http://msdn.microsoft.com/en-us/library/office/websvcstatusing.statusing_di_pj14mref%28v=office.14%29.aspx