Subsequent task assignments will take up work hours of a previous

B

Bill

For a given task, through MSP API we create task assignment and assign work
hours. We found out that subsequent task assignment will take up work hours
of a previous one even if we do not explicitly assign any work hours if the
work hour is 0.
But any assignment without explicitly assigning hours that precede the
assignment with work hours greater than 0 will show work hours 0, in other
words, previous assignment without any work hour assigned will show 0 work
hours.
All our task are of fixed duration.
Can anyone tell us how can this be resolved that if no work hours to
assignment is made, the work hours will retain 0 ?
assignments in our application assignment in MSP
ass1 work 0 hours ass1 work 0
hours
ass2 work 3 hours ass2 work 3
hours
ass3 work 0 hours ass3 work 3
hours
ass4 work 0 hours ass4 work 3
hours

Sample code below:
For Each xnAssignmentNode In xnlAssignmentList
'create assignment object
MSPAssignment = MSPTask.Assignments.Add(ResourceID:=intMSPResourceUID)
'set start date and finish date here
tempNode = xnAssignmentNode.SelectSingleNode("Work")
If Not (tempNode Is Nothing) Then
TempVal = Convert.ToDecimal(tempNode.InnerText.Trim,
System.Globalization.CultureInfo.InvariantCulture) * 60
If (MSPAssignment.Work <> TempVal) And (TempVal <> 0) Then
MSPAssignment.Work = TempVal
End If
End If
'We do not explicitly assign 0.0 hours to work property because that
could trigger MSP recalculate start and finish date.

next
 
J

Jan De Messemaeker

Hi,

Ass2 creates a duration to the task
Ass3 takes that duration, default units of 100%, and calculates work.
If you want it to be 0, make it 0 :)

HTH

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top