Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Schedule in MPP got disordered after updating Project Owner Using PSI(UpdateProject function)

$
0
0

hi,

i am using following set of codes for updating the project owner in Project Server.

String projectOwnerIDstrNew = Convert.ToString(dr["ProjectOwnerUID"]);                        
String projectOwnerIDstrOriginal = Convert.ToString(project_Ds.Project[0].ProjectOwnerID);
if (!projectOwnerIDstrNew.Equals(projectOwnerIDstrOriginal))
{                             
 Guid ownerID = new Guid(projectOwnerIDstrNew);
 project_Ds.Project[0].ProjectOwnerID = ownerID;

DataSet changedDataSet = project_Ds.GetChanges();
project_Ds = (WebSvcProject.ProjectDataSet)changedDataSet;

ConfirmProejctCheckedIn(ProjUid, project, queue);
project.CheckOutProject(ProjUid, Sessionid, SessionDis);

jobid = Guid.NewGuid();
project.QueueUpdateProject(jobid, Sessionid, project_Ds, false);

jobid = Guid.NewGuid();
project.QueuePublish(jobid, ProjUid, true, string.Empty);

jobid = Guid.NewGuid();
project.QueueCheckInProject(jobid, ProjUid, true, Sessionid, SessionDis);

bool managerChanged = true;

}

Using the codes i am now able to change the project owner.

The case is , when the dataset for the project is exceeding 1000 rows i am using dataset.getchanges function and passing the dataset only with changes to the UpdateProject function, otherwise in case if dataset.getchanges function is not used then the UpdateProject function throws an exception of ProjectLimitExceeds.

So using the getchanges function, project owner is getting changed but when i am opening my schedule in MPP i find so many changes in schedule.

I can find overallocation of resources as well. I can track this as i have already base-lined my schedule in beginning.

The dataset.Getchanges function is messing my schedule. I can't go with this, as we are dealing with live projects in my organizations and respective managers will not be happy if schedule gets tampered.

Can anyone suggest how to resolve this ?

Thanks,

Abhishek


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>