none
AssignmentBookingID in ProjectWebApp SQL DB not change after using QueueUpdateProjectTeam PSI method RRS feed

  • Question

  • AssignmentBookingID in ProjectWebApp SQL DB not change after using QueueUpdateProjectTeam PSI method.

    After using QueueUpdateProjectTeam PSI method in Project Server 2013 SP1 + CU OKT 2015 resource booking type changed to commited, but not in ProjectWebApp SQL DB.

    In Project 2013 Professional client resource booking type is commited (after using PSI).

    The code for changing booking type to commited:

     

           static private void ChgResBookingTypeInProject(Guid prjUid, Guid resUid)
            {
                bool fl_find_res = false;
                projectClient = new SvcProject.ProjectClient("basicHttp_Project");
                queuesystemClient = new SvcQueueSystem.QueueSystemClient("basicHttp_QueueSystem");
                SvcProject.ProjectDataSet dsProject = projectClient.ReadProject(prjUid, SvcProject.DataStoreEnum.PublishedStore);
                SvcProject.ProjectTeamDataSet dsProjectTeam = projectClient.ReadProjectTeam(prjUid);
                foreach (SvcProject.ProjectTeamDataSet.ProjectTeamRow resourceTeamRow in dsProjectTeam.ProjectTeam)
                    {
                    if (resourceTeamRow.RES_UID==resUid)
                        {
                        resourceTeamRow.RES_BOOKING_TYPE = 0;
                        fl_find_res = true;
                        }
                    }
                if (fl_find_res)
                    {
                    Guid sessionId = Guid.NewGuid();
                    Guid jobId = Guid.NewGuid();
                    projectClient.CheckOutProject(prjUid, sessionId, String.Empty);
                    projectClient.QueueUpdateProjectTeam(jobId, sessionId, prjUid, dsProjectTeam);
                    WaitForQueue(queuesystemClient, jobId);
                    jobId = Guid.NewGuid();
                    projectClient.QueuePublish(jobId, prjUid, true, String.Empty);
                    jobId = Guid.NewGuid();
                    projectClient.QueueCheckInProject(jobId, prjUid, false, sessionId, String.Empty);
                    WaitForQueue(queuesystemClient, jobId);
                    }
                }

    The T-SQL code getting booking type for test resource assignment:

    SELECT [AssignmentUID]
          ,[ProjectUID]
          ,[ResourceUID]
          ,[TaskUID]
          ,[AssignmentBookingID]
      FROM [ProjectWebApp].[dbo].[MSP_EpmAssignment]
      WHERE [ProjectUID] = 'DC15588B-064A-E411-8434-B4B52FABA1A3'

    The result is AssignmentBookingID=1 (not 0 as for commited)

    I have only one assignment in this test project.

    BUT IF I CHANGE BOOKING TYPE FROM PROPOSED TO COMMITED (OR FROM COMMITED TO PROPOSED) AND PRESS CALCULATE PROJECT BUTTON IN PROJECT 2013 PROFESSIONAL SP1 + CU OKT 2015 THE RESULT IS IDENTICAL IN PROJECT CLIENT AND SQL!!!


    • Edited by ZaytsevVV Thursday, January 21, 2016 1:45 PM
    Wednesday, January 13, 2016 10:43 AM