none
How to read the Actual Work send by SubmitStatusForResource function before publish the project? RRS feed

  • Question

  • Hi there!

    I'm updating the actual work using the SubmitStatusForResource function. After this, I'm doing the approvals of those works. First time, when I do these updates, I'm reading the actual work from the AssignmentByDay_UserView view from the reporting database because the projects are published.

    If I need to do more updates, is there any way to read these actual work before publish the project or approve them?

    Regards.

    LyE.

    Tuesday, October 9, 2012 8:57 AM

Answers

  • In Reporting you will - as far as I know - only see published data, and even that with some time delay. You really have to use Statussing for not yet approved changes. And as you are deep down in inner functioning of Project Server, I would read all timesheet data through the PSI, not using reporting, just to avoid timing conflicts.

    Jan Cirpka

    • Marked as answer by LyE- Monday, October 15, 2012 8:28 AM
    Thursday, October 11, 2012 8:14 AM

All replies

  • I'm not sure if I understand your question - but I assume that you are concerned about Actuals that are yet to be approved. These actuals are all part of Statusing and will not be available through the Reporting DB.

    The Statusing.ReadStatusForResource Method should help you here - in the returned StatusingDataSet you will find the assignments - including the status indicating wether the data is already approved or not.


    Jan Cirpka

    Tuesday, October 9, 2012 10:55 AM
  • Hi Jan,

    Not exactly, the Actuals are approved but the project is not published. I was thinking that is necessary to publish the project for get the changes... I just realized it's not necessary to do it.

    Maybe with the ReadStatusForResource I can resolve it... I'll try it.

    Thanks

    LyE

    Tuesday, October 9, 2012 12:21 PM
  • Hi,

    Something is going wrong...

    I submit Actuals for resource 1 and task 1 and day 1... I call the SubmitStatusForResource and I approve it.

    Then I need to do an update for the same assignment and day... but if I read the Actuals from the AssignmentByDay_UserView, I get the Actuals that I have before the first update. Then, can I read it in the StatusingDataSet? Or how can I do it?

    Thanks.

    Tuesday, October 9, 2012 1:17 PM
  • Hi,

    Suposing that I have the Task1 assigned to Resource1, this is my Assignment1... and its Actuals is 300 minutes for a particular date, Date1. These were submitted by the SubmitStatusForResource function in two updates, the first one of 120 minutes and the second of 180 minutes.

    Now, in my database I have two records with new updates for Assignment1. My table could be something like this:

    Row1 - Resource1 - Task1 - Date1 - 120 minutes - 1 (transferred to Project Server)
    Row2 - Resource1 - Task1 - Date1 - 180 minutes - 1 (transferred to Project Server)
    Row3 - Resource1 - Task1
     - Date1 - 240 minutes - 2 (it's an update for Row1. After this update, Actuals for Assignment1 should be 300 - 120 + 240 = 420 minutes)
    Row4 - Resource1 - Task1
     - Date1 - 180 minutes - 3 (it's a delete for Row2. After this update, Actuals for Assignment1 should be 420 - 180 = 240 minutes)

    Then I proceed as follows:

    - Read from my tables the rows not transferred to Project Server and do a loop.
    - For each row I check that it's an update or delete for another row. (Row3 is an update)
    - Read the Actuals for Assignment1 using the AssignmentByDay_UserView from Reporting DB. It returns me 300 minutes. It's Ok.
    - I substract minutes in Row1 from minutes returns by the function. 300 - 120 = 180. Submit the changes by SubmitStatusForResource function and approve the status updates.
    - I add minutes in Row3 for the time saved before. 180 + 240 = 360. I again submit the changes and approve status updates.
    - I read Row4 and check that is a delete for another row. Then, I need to read the Actuals again. Now if I read it by the AssignmentByDay_UserView it returns me 300 minutes, not the 360 that I've update.

    When is the view updated? How time it takes? Where can I read the Actuals to ensure it's correct? Any help, please?

    Thanks!

    Wednesday, October 10, 2012 11:08 AM
  • In Reporting you will - as far as I know - only see published data, and even that with some time delay. You really have to use Statussing for not yet approved changes. And as you are deep down in inner functioning of Project Server, I would read all timesheet data through the PSI, not using reporting, just to avoid timing conflicts.

    Jan Cirpka

    • Marked as answer by LyE- Monday, October 15, 2012 8:28 AM
    Thursday, October 11, 2012 8:14 AM
  • Thanks Jan,

    Reading time saved using the timephased instead the the reporting DB seems to work.

    Regards.

    Monday, October 15, 2012 8:29 AM