none
Status Date Change with the PSI Call... RRS feed

  • Question

  • Hi folks,

    as we know that, when ever the project gets created with the "QueueCreateProject" the project gets created and by default the status date of the project will be associated with the "Start Date" of the project and if we want to modify the same to "NA", then we need to update the dataset. I tried with the below code but it is NOT getting updated...Am i missing something here?

    The problem is with the commented line mentioned below....

    SvcProject.ProjectDataSet dsProject1 = new ProjectDataSet();

                    dsProject1 = pjsrv.ReadProjectEntities(proj_guid, 32, SvcProject.DataStoreEnum.PublishedStore);
                    dsProject1 = pjsrv.ReadProject(proj_guid, SvcProject.DataStoreEnum.PublishedStore);

    string ProjectGUID = dsProject1.Tables[dsProject1.Project.TableName].Select("PROJ_UID = '" + proj_guid.ToString() + "'")[0]["PROJ_UID"].ToString();

    Guid projectGuidNew = new Guid(ProjectGUID);
            if (projectGuidNew == proj_guid)
                {
                    DataView dvProj = new DataView(dsProject1.Tables[0]);
                    foreach (DataRow drProj in dsProject1.Tables[0].Rows)
                    {
                        if (drProj["PROJ_UID"].ToString().ToUpper() == ProjectGUID.ToString().ToUpper())
                        {
                            drProj["PROJ_NAME"] = strWBSL1Desc;
                            if (projMode == "Create")
                            {
                                drProj["PROJ_INFO_START_DATE"] = strStartDate;//"2011-05-02 08:00:00.000";
                                //drProj["PROJ_INFO_STATUS_DATE"] = DBNull.Value;
                            }
                        }
                    }
                }

    Thanks,

    Rajasekhar


    B Rajasekhar Reddy

    Tuesday, February 14, 2012 9:03 AM

All replies

  • Are you getting any error? Can you please show the project update code as well.


    Thanks, Kashif

    Tuesday, February 14, 2012 11:35 AM
  • Hi Kashif,

    Thanks for the response.

    There are absolutely no errors thrown while updating the project with the "Status Date" of the project with "DBNull.Value" and the code is as shown below.

                    DataView dvProj = new DataView(dsProject1.Tables[0]);
                    foreach (DataRow drProj in dsProject1.Tables[0].Rows)
                    {
                        if (drProj["PROJ_UID"].ToString().ToUpper() == ProjectGUID.ToString().ToUpper())
                        {
                            drProj["PROJ_NAME"] = strWBSL1Desc;
                            if (projMode == "Create")
                            {
                                drProj["PROJ_INFO_START_DATE"] = strStartDate;//"2011-05-02 08:00:00.000";
                                drProj["PROJ_INFO_STATUS_DATE"] = DBNull.Value;
                            }
                        }
                    }


                    pjsrv.CheckOutProject(proj_guid, SessionId, "CheckOutSession");
                    pjsrv.QueueUpdateProject(JobId, SessionId, dsProject1, false);
                    WaitForQueue(queue, JobId);
                    pjsrv.QueueCheckInProject(JobId2, proj_guid, false, SessionId, "");
                    WaitForQueue(queue, JobId2);


    The dataset "dsProject1" in the above code does have the "Status Date" as NULL (nothing is there in the column and it's blank) after the updating the project with QueueUpdateProject and before that as well...

    so then why the Status Date is til showing the earlier date only i.e. start date of the project? Am i missing some thing here?

    Pl let me get the clarity on the same...I am guessing this is the bug in Project Server 2010 and we didn't have any patches installed in our infrastructure as of now...so may need to check even after installing the patches as well..


    B Rajasekhar Reddy

    Wednesday, February 15, 2012 12:52 PM
  • I'll try the same thing and will get back. You can check what SP1 got for the fixes, might be your problem is mentioned there.


    Thanks, Kashif


    • Edited by Kashif Nizam Wednesday, February 15, 2012 1:05 PM
    Wednesday, February 15, 2012 1:04 PM
  • Hi Kashif,

    I am suspecting that, this is the bug and i couldnt found this in any of the patches inclusing SP1 and latest CU aswell...

    Today i may be getting one server where in i would be installing the Project Server 2010 with all the latest patches bing applied and then will try this issue.


    B Rajasekhar Reddy

    Friday, February 17, 2012 4:50 AM
  • I've always learned (perhaps incorrectly) that the Status Date cannot be
    modified with the PSI.
     
    Not to sound like a broken record, but that leaves VBA, perhaps a call on
    open after creation to set it to NA or something like that?  There's really
    nothing in PWA dependent on the status date to the best of my knowledge.
     It only becomes relevant when opening in the client.
     
     

    Andrew Lavinsky [MVP] Blog: http://azlav.umtblog.com Twitter: @alavinsky
    Friday, February 17, 2012 12:24 PM
    Moderator
  • Andrew, thanks for the response.

    I am wondering why cant we change the "Status date" with the PSI, as we are able to change the other fields like Start Date, Finish date of the project...is there documentation available stating that Status date should be changed with VBA instead of PSI etc? Could you pl send me the link? I am literally poor in searching the relevant data :( 

    In our case, we needed to create a project from the template (which is having custom fields at the project level with the default data) and then we need to set up the custom fields data of the project with the real values.

    So we always need to make the "Status Date" as NA whenever we create the project for the first time with the PSI call. Pl suggest me whether it is possible by any other means...

    Thanks!


    B Rajasekhar Reddy

    Friday, February 17, 2012 12:38 PM
  • I can't speak to design, but here's a helpful article: http://msdn.microsoft.com/en-us/library/ee767706.aspx

    I'd also recommend taking a look at the SDK...


    Andrew Lavinsky [MVP] Blog: http://azlav.umtblog.com Twitter: @alavinsky

    Friday, February 17, 2012 2:13 PM
    Moderator
  • Thanks andrew for the response.

    Yes. as you mentioned, the status date field cant be modified with the PSI. And i still dont understand why Microsoft has a restriction like this.

    Anyway thanks for clarifying me the same.


    B Rajasekhar Reddy

    Monday, February 20, 2012 4:08 AM
  • Hi guys.

    Raja, did you do this one?

    I need to create a app that modify all the status date to the current date and then re-calculate all of my index using PSI. Is it possible?

    Cheers


    Renato Torres Project Blog - Projetizando

    Tuesday, May 8, 2012 3:04 PM
  • Hi Renato,

    Nope. We can't change the status date with PSI.

    I am just thinking What we can do for your case is that, we can create a app (probably C# console) which opens the projects one by one with MPP and set the status date as NA (so that it calculates till today) and then save, publish the projects (with VBA recording events) and close the same. And this is the only possible way i know at this moment for your request.


    B Rajasekhar Reddy. Life’s real failure is when you do not realize how close you were to success when you gave up - Vinod Kumar (http://blogs.extremeexperts.com/)

    Thursday, May 10, 2012 10:23 AM
  • Hi Raja,

    First, thanks for your reply.

    So, I can change this date using PSI, but my indicators just updated opening and republishing the project using the project professional.

    My point is how can I open project using project professional from project server using the project dll. Do you know?

    Cheers


    Renato Torres Project Blog - Projetizando

    Friday, May 11, 2012 2:32 PM
  • My guess on the WHY is that the serverside scheduling engine does not recalculate any Earned Value numbers. Allowing a change to the Status Date via the PSI would open the expectation that changing it would reclaculate EV, which will not happen.

    Just a thought.


    Brian Kennemer - Project MVP
    DeltaBahn Senior Architect
    endlessly obsessing about Project Server…so that you don’t have to.
    Blog | Twitter | LinkedIn

    Friday, May 11, 2012 2:35 PM
    Moderator