none
PS 2010: Statusing.UpdateStatus TimephasedData error RRS feed

  • Question

  • Hi,

    I'm working on PS 2010 plug-in, that is supposed to update actual work value.

    If I simply update the value, it works perfectly fine:

     

    string pidActualWork = PSLib.AssnConstID.s_apid_actual_work.ToString(System.Globalization.CultureInfo.InvariantCulture);
    
    changeXml.Append("<Changes>");
    changeXml.Append("<Proj ID='" +
      currentProject.Project[0].PROJ_UID.ToString() + "'>");
    changeXml.Append("<Assn ID='" +
      assignmentItem.ASSN_UID.ToString() +
      "' ResID= '" + humanResource.Resources[0].RES_UID + "'>");
    changeXml.AppendFormat(
      "<Change PID=\"{0}\">{1}/Change>", pidActualWork, time.Hours * 60 * 1000);
    changeXml.Append("</Assn>");
    changeXml.Append("</Proj>");
    changeXml.Append("</Changes>");
    
    

     

    The problem is, that when I add 'start' and 'end' values:

     

    changeXml.Append(
      "<PeriodChange PID=\"" + pidActualWork +
      "\" Start=\"" + time.SpentOn.ToString("yyyy-MM-ddTHH:mm:ss") +
      "\" End=\"" + time.SpentOn.AddHours(time.Hours).ToString("yyyy-MM-ddTHH:mm:ss") + "\">" +  
      (time.Hours * 60 * 1000).ToString() +
      "</PeriodChange>");
    

     
    , the UpdateStatus method returns:

    StatusingCannotSetTimephasedDataInManualTasks


    I've tried to find solution, but almost every sample I've found was based on PS 2007 and this error is, as far as I know, limited to PS 2010. Any suggestions how to make it work ?

    Thanks, Peter

    Friday, May 20, 2011 7:49 AM

Answers

  • Hello Peter,

     seems you´re trying to update an manual planned tasks with timephased data. This is not supported (...not yet, with SP1 this should be possible, referring to http://blogs.msdn.com/b/project/), so for now you can only set actuals without start/finish dates on these tasks.

    Greets

    Maik

     

    Friday, May 20, 2011 12:04 PM

All replies