Hi
When I create Timephased Data to a mpp File and open it with MSProject2010 i get wrong values for the Last two days
Please have a look at the following code
moTask = moProject.RootTask.Children.Add(“Task”)
moTask.[Set](Tsk.Type, TaskType.FixedUnits)
moTask.[Set](Tsk.Start, New Date(2016, 5, 19))
Dim dHours As Double
dHours = moProject.Get(Prj.Calendar).GetWorkingHours(dtDateFromDate(New Date(2016, 5, 19).AddHours(8)), New Date(2016, 5, 31).AddHours(17)).WorkingHours.TotalHours
’dHours = moProject.Get(Prj.Calendar).GetWorkingHours(dtDateFromDate(New Date(2016, 5, 19).AddHours(8)), New Date(2016, 6, 1).AddHours(17)).WorkingHours.TotalHours
moTask.[Set](Tsk.Duration, moProject.GetDuration(dHours, TimeUnitType.Hour))
moTask.[Set](Tsk.Work, moProject.GetDuration(22@, TimeUnitType.Hour))
'build Assignment
moRes = moProject.Resources.Add(“Empl”)
moAssign = moProject.ResourceAssignments.Add(moTask, moRes)
moAssign.[Set](Asn.WorkContour, WorkContourType.Contoured)
For Each oMPSTime As Aspose.Tasks.TimephasedData In moAssign.TimephasedData
oMPSTime.Value = "PT0H0M0S"
Next
’Splitt 22 Hours Work
For Each oMPSTime As Aspose.Tasks.TimephasedData In moAssign.TimephasedData
Select Case New Date(oMPSTime.Start.Year, oMPSTime.Start.Month, oMPSTime.Start.Day)
Case New Date(2016, 5, 19)
oMPSTime.Value = “PT4H0M0S”
Case New Date(2016, 5, 23)
oMPSTime.Value = “PT2H0M0S”
Case New Date(2016, 5, 24)
oMPSTime.Value = “PT2H0M0S”
Case New Date(2016, 5, 25)
oMPSTime.Value = “PT3H0M0S”
Case New Date(2016, 5, 26)
oMPSTime.Value = “PT3H0M0S”
Case New Date(2016, 5, 27)
oMPSTime.Value = “PT2H0M0S”
Case New Date(2016, 5, 30)
oMPSTime.Value = “PT1H0M0S”
Case New Date(2016, 5, 31)
oMPSTime.Value = “PT5H0M0S”
End Select
oMPSTime.TimephasedDataType = TimephasedDataType.AssignmentRemainingWork
Next
With Task.End New Date(2016, 5, 31) i get
3 Hours for (2016, 5, 30) and
3 Hours for (2016, 5, 31)
With Task.End New Date(2016, 6, 01) i get
1 Hours for (2016, 5, 30) and
2,5 Hours for (2016, 5, 31) and
2,5 Hours for (2016, 6, 01)
Stephan
Hi Stephan,
We are sorry for a delayed response. We are currently working over your query and will soon share our feedback with you here.
Hi Stephan,
Thank you for contacting Aspose support team.
This issue is reproduced and logged under Id: TASKSNET-1565 for further investigation by the product team. You will be automatically notified once any update is received in this regard.
The issues you have found earlier (filed as TASKSNET-1565) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.