none
Calculate daily work based on constrained finish date. RRS feed

  • Question

  • I am trying to get Project Pro 2010 to calculate daily work hours based on remaining work and a constrained “Must Finish On” date.

    Basically, I need to schedule someone for 5 hours of work that must be completed in a 5 day work week (M-F).  If that person doesn’t complete their one hour of work on Monday, I need the system to show that they have 1.25 hours of work to do T-F.  If they don’t complete any work on Tuesday, software should update work to 1.667 hours per day W-F.  No work on Wednesday, 2.5 hours T-F and no work Thursday, all 5 hours must be done on Friday.

    I can get the software to act EXACTLY like I want it to if I come in and manually decrease the duration every single day but obviously, that isn’t a viable option.

    I’ve tried all variations of fixed work/units/duration, manually scheduled, effort driven and none of them seem to work as I need them to.

    Any suggestions would be greatly appreciated.

    Thanks,

    DJ

     


    Daren Johnson
    Tuesday, November 15, 2011 3:00 PM

Answers

  • OK I played with this and I have a VBA solution (or really just a starting point)

    The code below will work under the following circumstances:

    1. the task you select does not have any actual work already applied to it (if you run this code on a task that has any actual work on it, it will remove the actual work on the portion of the task that falls between the task start and the status date)
    2. the Status Date for the project is AFTER the task start date. (right now it will throw an error if the status date is  prior to the task start date)

    Select the task(s) you want to perform your original request on and then run this code. The code will act on the selected tasks and will set Actual Work to 0 for each Day that falls between the Task Start date and the Project Status date.

    You should test it completely on a sample project before you run it on a production schedule.

    Sub Reschedule()
    Dim T As Task
    Dim TSD As TimeScaleValues
    Dim Counter As Integer
    
    For Each T In ActiveSelection.Tasks
        If Not (T Is Nothing) Then
            Set TSD = T.TimeScaleData(StartDate:=T.Start, EndDate:=ActiveProject.StatusDate, Type:=pjTaskTimescaledActualWork, timescaleUnit:=pjTimescaleDays)
            For Counter = 1 To TSD.Count
                TSD(Counter).Value = 0
            Next Counter
        End If
    Next T
    End Sub
    


    Brian Kennemer – DeltaBahn Senior Architect
    Blog | Twitter | LinkedIn
    Tuesday, November 15, 2011 6:47 PM
    Moderator

All replies

    1. Create your task
    2. Make it Fixed Duration
    3. Set Duration to 5 days
    4. Set Work to 5 hours
    5. Assign your resource
    6. Display the Task Usage view
    7. Insert Actual Work into the yellow "timescaled area"
    8. (make sure the timescale shows days)
    9. set actual work for day 1 to 0
    10. (see workf or the remaming 4 days change to 1.25)
    11. Set actual work for day 2 to 0
    12. (see work for the remaining 3 days change to 1.67)
    13. Set atual work for day 3 to 0
    14. (see work for the remaining 2 days change to 2.5)
    15. ....

    Brian Kennemer – DeltaBahn Senior Architect
    Blog | Twitter | LinkedIn
    Tuesday, November 15, 2011 3:25 PM
    Moderator
  • DarenJ,

    I see that you unmarked my answer. Are you getting different results when you follow these steps?


    Brian Kennemer – DeltaBahn Senior Architect
    Blog | Twitter | LinkedIn
    Tuesday, November 15, 2011 6:05 PM
    Moderator
  • Thank you for your post Brian, however, that would require me to manually enter "0's" into the timescaled area for each task that was required to be done during that week.  Manually entering the 0's would be no different that me coming in and manually changing the duration as I mentioned earler.

    I was looking for the software to automatically calculate work as it pertains to remaining duration and status date using the "Calculate Project" or "Update Project" buttons.

    As for marking the answer... I would think the person posing the question should be given ample opportunity to test scenarios and decide if the proposed suggestion is "the answer" instead of having someone else mark it for them.  Sorry if my unmark caused any confusion.


    Daren Johnson
    Tuesday, November 15, 2011 6:12 PM
  • There was no confusion. I just wanted to make sure that it was working for you. I saw that you unmarked it and wanted to double check on the situation.

    There is not a way to do what you are asking. The only way to do this would be to update the status of your tasks with the actual work that was completed on those days. In your case 0 work (or less than the 1 per day that was scheduled would both have the desired effect of rescheduling the work on the remaining days.


    Brian Kennemer – DeltaBahn Senior Architect
    Blog | Twitter | LinkedIn
    Tuesday, November 15, 2011 6:29 PM
    Moderator
  • OK I played with this and I have a VBA solution (or really just a starting point)

    The code below will work under the following circumstances:

    1. the task you select does not have any actual work already applied to it (if you run this code on a task that has any actual work on it, it will remove the actual work on the portion of the task that falls between the task start and the status date)
    2. the Status Date for the project is AFTER the task start date. (right now it will throw an error if the status date is  prior to the task start date)

    Select the task(s) you want to perform your original request on and then run this code. The code will act on the selected tasks and will set Actual Work to 0 for each Day that falls between the Task Start date and the Project Status date.

    You should test it completely on a sample project before you run it on a production schedule.

    Sub Reschedule()
    Dim T As Task
    Dim TSD As TimeScaleValues
    Dim Counter As Integer
    
    For Each T In ActiveSelection.Tasks
        If Not (T Is Nothing) Then
            Set TSD = T.TimeScaleData(StartDate:=T.Start, EndDate:=ActiveProject.StatusDate, Type:=pjTaskTimescaledActualWork, timescaleUnit:=pjTimescaleDays)
            For Counter = 1 To TSD.Count
                TSD(Counter).Value = 0
            Next Counter
        End If
    Next T
    End Sub
    


    Brian Kennemer – DeltaBahn Senior Architect
    Blog | Twitter | LinkedIn
    Tuesday, November 15, 2011 6:47 PM
    Moderator
  • Thank you Brian, that is some nifty little code!  Works great on the simple little schedule I've been testing on.  I will try it on some larger schedules and see if it will work as I envision.

    Thank you for taking the time to look into this!


    Daren Johnson
    Tuesday, November 15, 2011 9:12 PM
  • We can put some checks on it if we need to to make sure that it will not act if there is already actual work.

    We could MAYBE even add some thing to see if there was actual work on the beginning of the task and you want to perform this action between the end of the actual work on the Status Date but that is a much more complex snippet of code to write than this one above. If we can avoid that then that would be best.

    Below is the same code but it will NOT perform the action if Actual Work on the task is greater than 0.

     

    Sub Reschedule()
    Dim T As Task
    Dim TSD As TimeScaleValues
    Dim Counter As Integer
    
    For Each T In ActiveSelection.Tasks
        If Not (T Is Nothing) Then
            If T.ActualWork = 0 Then
                Set TSD = T.TimeScaleData(StartDate:=T.Start, EndDate:=ActiveProject.StatusDate, Type:=pjTaskTimescaledActualWork, timescaleUnit:=pjTimescaleDays)
                For Counter = 1 To TSD.Count
                    TSD(Counter).Value = 0
                Next Counter
            End If
        End If
    Next T
    End Sub
    


    Brian Kennemer – DeltaBahn Senior Architect
    endlessly obsessing about Project Server…so that you don’t have to.
    Blog | Twitter | LinkedIn
    Tuesday, November 15, 2011 9:24 PM
    Moderator