none
Is there any way to update "Actual Hour" of an Assignment RRS feed

  • Question

  • hi all,

    I am doing some programming task related to Project Server. I wonder is there a way to update the "Actual Hour" of an Assignment programmatically?

    The scenario is like this:

    + Owner creates a project, tasks ...

    + Owner assign task T to UserX, call this AssignmentTX

    The application will update the "Actual Hour" that AssignmentTX, later if the Owner approve it( from PWA => Task Update => Approve the related assignments) then the "Actual Hour" will be shown on the schedule.

    The "Actual Hour" can be more than 8h because UserX can work 10h on a specific date.

     

     

    Any idea is highly appreciated!!

     

     

     

    Friday, December 16, 2011 8:42 AM

Answers

  • Hi all,

    Turn out this issue is because of EPM setting. I post it here, hope it can help someone out :D

    Refer to the image below ( Server Setting => Task and Display Setting ). You must set the "Tracking method" to be either :

    1. <label for="ctl00_ctl00_PlaceHolderMain_PWA_PlaceHolderMain_idFormSectionTrackingMethod_ctl01_opTrackingMethod_1">Actual work done and work remaining. Resources report the actual work done and the work remaining to be done on each task.</label>

    Or <label for="ctl00_ctl00_PlaceHolderMain_PWA_PlaceHolderMain_idFormSectionTrackingMethod_ctl01_opTrackingMethod_2">Hours of work done per period. Resources report their hours worked on each task per period.</label>

    for the EPM to capture the Actual Work correctly.

     

     

    Some other stuff that you have to pay attention when using "statusing.UpdateStatus" method

    + The data submitted to EPM is a SOAP message, so pay attention to the Length of the message. If your data is huge, you should break it into smaller chunk.

    + If you are going to update other people's data, so you should pay attention to Impersonation mechanism, access right... ( as noted in here http://msdn.microsoft.com/en-us/library/aa974347%28v=office.12%29.aspx)

     

    have fun...

     

     


    Lam Nguyen
    • Marked as answer by lamabeto Thursday, January 19, 2012 4:20 AM
    Thursday, January 19, 2012 4:18 AM

All replies

  • I am using Project Server 2007
    Friday, December 16, 2011 8:44 AM
  • Hi there,

    The UpdateStatus method in the Statusing Web service can edit timephased actuals on assignments after the project manager updates and publishes the assignment data.

    Sample code:
    http://msdn.microsoft.com/en-us/library/gg209876.aspx

    Does that help?
    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Friday, December 16, 2011 9:35 AM
  • Dear Amit,

    thanks a lot for your reply.

    I already try the UpdateStatus: construct the XML string and then update the desired fields. In this case is "Actual Hour".

    In my case, I also have to Impersonate the UserX account so I will be able to update AssignmentTX. But let's not discuss about this Impersonation.

    What I've done so far with UpdateStatus:

    + I am able to update the Actual Work on an Assignment => Great(refer to the image - in Transaction Comment and Task History)


     

     

    + Then I open PWA ( as the Owner) to Approve all these updated Assignements

    Refer to the image: I submitted 19h of Actual Hour on 26Dec. But the picture show ZERO.

     

    Any idea about this?

    I am struggling with it :D

     

     

    • Marked as answer by lamabeto Thursday, January 19, 2012 4:19 AM
    • Unmarked as answer by lamabeto Thursday, January 19, 2012 4:19 AM
    Friday, December 16, 2011 11:48 AM
  • hi Amit,

    Have you tried to run these piece of code?

    Any ideas on this issue?

     

    thanks for you help.


    Lam Nguyen
    • Marked as answer by lamabeto Thursday, January 19, 2012 4:19 AM
    • Unmarked as answer by lamabeto Thursday, January 19, 2012 4:20 AM
    Thursday, December 22, 2011 6:23 AM
  • Hi all,

    Turn out this issue is because of EPM setting. I post it here, hope it can help someone out :D

    Refer to the image below ( Server Setting => Task and Display Setting ). You must set the "Tracking method" to be either :

    1. <label for="ctl00_ctl00_PlaceHolderMain_PWA_PlaceHolderMain_idFormSectionTrackingMethod_ctl01_opTrackingMethod_1">Actual work done and work remaining. Resources report the actual work done and the work remaining to be done on each task.</label>

    Or <label for="ctl00_ctl00_PlaceHolderMain_PWA_PlaceHolderMain_idFormSectionTrackingMethod_ctl01_opTrackingMethod_2">Hours of work done per period. Resources report their hours worked on each task per period.</label>

    for the EPM to capture the Actual Work correctly.

     

     

    Some other stuff that you have to pay attention when using "statusing.UpdateStatus" method

    + The data submitted to EPM is a SOAP message, so pay attention to the Length of the message. If your data is huge, you should break it into smaller chunk.

    + If you are going to update other people's data, so you should pay attention to Impersonation mechanism, access right... ( as noted in here http://msdn.microsoft.com/en-us/library/aa974347%28v=office.12%29.aspx)

     

    have fun...

     

     


    Lam Nguyen
    • Marked as answer by lamabeto Thursday, January 19, 2012 4:20 AM
    Thursday, January 19, 2012 4:18 AM