I am conducting tests with the technical feasibility Aspose.Task package for a system and I can not get the schedule of the task (Task.Calendar is null) with the hours worked per day.
I'm with the temporary license.
I wonder if this property is always null.
Thanks.
Att,
Amanda Santana Rebouças
This message was posted using Email2Forum by salman.sarfraz.
Hi Amanda,
Hello,
I’m trying to get information from planned hours per day for the tasks.
I’m using version 3.0.0 and Aspose.Task Project 2003.
Question 1: Can I get the schedule information based Work, Actual Work and Work designed, as this picture attachment?
Question 2: In the code below for the latest Labor Resource Base CA does not match the information on schedule.
foreach (ResourceAssignment resourceTask in project.GetResourceAssignmentsByTask(task))
{
if (resourceTask.Resource!=null)
{
if (resourceTask.Resource.Calendar != null)
{
Aspose.Tasks.Calendar cal = resourceTask.Resource.Calendar;
TimeSpan ts;
if (resourceTask.Baseline.Count > 0 )
{
AssignmentBaseline baseResouce = ((AssignmentBaseline)resourceTask.Baseline[0]);
DateTime dtTemp = baseResouce.Start;
dtEnd = baseResouce.Finish;
writeText(" Resource " + resourceTask.Resource.Name + " PlanWork - " + dtTemp.ToShortDateString() + " to " + dtEnd.ToShortDateString() + " - Hours: " + baseResouce.Work.TotalHours);
WorkUnit wu = cal.BaseCalendar.GetWorkingHours(dtTemp, dtEnd);
//get Work Plan per Day
while (dtTemp <= dtEnd)
{
if (cal.BaseCalendar.IsBaseCalendar)
{
ts = cal.BaseCalendar.GetWorkingHours(dtTemp);
writeText(" PlanWork - " + dtTemp.ToShortDateString() + " - Hours: " + ts.TotalHours);
}
dtTemp = dtTemp.AddDays(1);
}
}
}
}
}
Hello again,
On the figure posted “Task Information”, actually the Calendar of this task set to Nothing, then so is null in Aspose.
I managed to obtain the value work of base of resource and date as shown in picture by changing the code to:
//get Work Plan per Day
while (dtTemp <= dtEnd)
{
ts = cal.BaseCalendar.GetWorkingHours(dtTemp);
if (cal.BaseCalendar.IsBaseCalendar)
{
writeText(" PlanWork - " + dtTemp.ToShortDateString() + " - Hours: " + ts.TotalHours * resourceTask.Units);
}
dtTemp = dtTemp.AddDays(1);
}
Now I wonder if I can get the information from the Actual Work and the Work that appears on the line for each task/resource per day.
Thank you.
Hi Amanda,
Hi Sergey,
Just to double check... I'm anticipating a July release this week. I have been holding off testing until this next release. Can you confirm there will be an update!!
I'm bumping up against many similar calculations that need to be performed to get accurate updates to plans. I expect to be working on these during August...
any info appreciated on the next release..
Regards, Bruce
Hi Bruce,
Ok, thanks for the reply,
As shown, the “Base Work” for resource/ day I can get, but to use Aspose in my project I need get the same standard of Work Base on other information of current “Actual Work” and “Real Work” .
In the final version of this week there will be this feature?
Thanks
Hi Amanda,
The issues you have found earlier (filed as 16988) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.