Updating actual work with PSI

Copper Contributor

I'm doing integration with Sharepoint and use PSI. I have some troubles with writing actual work, I use WebSvcStatusing.Statusing.UpdateStatus method and PeriodChange element for xml, but after running the code i can't see anything in Approval Center. If i call the QueueApplyStatusApprovals method it fails with JobState.Unknown. I tried to change the project calendar to standard calendar and everything worked out but with custom calendar it doesn't work. I use material resources and own the assignment. When i searched the error message in uls logs there was an SQL error with the code 535 that says "The datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large. Try to use datediff with a less precise datepart."

 

 

string changeXml = CreateChangeXml(projUid, assnUid, resUid,
                                                   hoursWorked, regularWork, true);
												   
statusingClient.UpdateStatus(changeXml);
statusingClient.SubmitStatus(new Guid[] { assnUid }, "Updated actual work");

SvcStatusing.StatusApprovalDataSet statusApprovalDs = statusingClient.ReadStatusApprovalsSubmitted(false);
for (int i = 0; i < statusApprovalDs.StatusApprovals.Count; i++)
{
	Console.WriteLine("Approving assignment update for {2} to {0} in {1}.", statusApprovalDs.StatusApprovals[i].TASK_NAME, statusApprovalDs.StatusApprovals[i].PROJ_NAME, statusApprovalDs.StatusApprovals[i].RES_NAME);
	statusApprovalDs.StatusApprovals[i].ASSN_TRANS_ACTION_ENUM = (int)PSLibrary.TaskManagement.StatusApprovalType.Accepted;
}
Console.WriteLine("Saving status updates...");

statusingClient.UpdateStatusApprovals(statusApprovalDs);
Guid jobUid = Guid.NewGuid();
statusingClient.QueueApplyStatusApprovals(jobUid, "Approving all status updates via utility");
Helpers2.WaitForQueue(queueSystemClient, jobUid);

 

 

0 Replies