Task Duration & Work figures wrong

Hi,

I logged a post last year about a problem I saw in an export I was working on but never got a reply. I've come accross this again. Basically I'm setting a Tasks Duration and Work properties to 7.5 hours. These values are remaining intact up to the point I export using the ProjectWriter.

When I open the resultant xml file both values have been set to 8.5 hours. There is obviously some calculation going on underneath here, and the value I'm putting into the property is being overrwritten. I would like to know what the calculation is, or what other values can have an effect on these values?

Cheers.

Hi,

I'm exporting a plan that has a Task whose work figure is 7.5 hours. When I open the output .xml file the work figure has been changed to 8.5 hours?? The code looks something like this...

Dim oMSProject as Aspose.Tasks.Project = FunctionToGetProjectPlan()

Dim oProjectWriter as Aspose.Tasks.ProjectWriter = New Aspose.Tasks.ProjectWriter

oProjectWriter.write(oMSProject, Response.OutputStream, ASpose.Tasks.TasksDataFormat.XML)

If I put a breakpoint on the last line and check the work figure of the task it says 7.5, after the file is exported the XML timespan says 8.5. Any ideas on what the function that generates the PT8H30M0S format timespan does here???

Also I logged a forum post a few days ago regarding importing empty tasks, have you an update on that please?

Cheers,

Rob.

Hi,

Just a thought ... I had a problem with the 'time of day' part of a date. When I did not set this correctly, I could lose up to a day in time. It might be worth double checking the start time of day or the finish time of day and see if this accounts for the hour?

I'm now working to ensure that start times and end times are reasonable given the calendar and minutes per day.

Regards, Bruce

Hi Rob,


I am extremely sorry that your last year question is still unanswered.

Could you please provide us with your code sample and resulting data so we could understand the problem. Bruce is right as always, the calculation depends on some project settings but some error could be available here as well.

We had some duration rounding error but it was corrected in previous versions. Please let us know the Aspose.Tasks version you are using now or try it with the newest one. You can download it here.

Sorry again for such long delay.

Hi,

Firstly thanks for both replies guys.

I'm running Tasks version 2.2.0 at the moment. I did try downloading the latest version but apparently our license date means we cannot run it (due to the period of free updates running out before the release date).

I've attached a small vb.net app to replicate the problem. Basically i've got a working day from 9:00am to 17:30pm (which includes an hour lunch). I've set these times up in the calendar. I have a one day task that goes from 9-17:30, and I set the duration and work to 7.5 hours.

The resultant xml file has the duration and work set to 8.5 hours.

Cheers,

Rob.

Hi Rob,


Unfortunately we had the error in duration rounding in some previous releases. The issue was discussed in this forum thread and fixed in Aspose.Tasks 2.6.0 release. You can find the interim Aspose.Tasks 2.5.0.8 version in the thread as well.

Could you try these versions? I am afraid that it is impossible to fix the issue in your old version now.

Sorry for inconvenience.

Sergey,

Thanks again for the quick response.

I downloaded the 2.6.0 version and I can confirm this has fixed the problem.

Cheers,

Rob.