joniles / mpxj

Primary repository for MPXJ library
http://www.mpxj.org/
GNU Lesser General Public License v2.1
246 stars 104 forks source link

Wrong timephased data when importing from mpp #41

Open RobertPaasche opened 6 years ago

RobertPaasche commented 6 years ago

It's copied from: https://sourceforge.net/p/mpxj/bugs/322/ (This is a major Bug for us.)

ResourceAssignment::getTimephasedActualWork() returns incorrect values when read from mpp (Project 2013). From xml it is fine. Tested with mpxj version 7.1.0. (getTimephasedWork() seems also wrong)

For example see attached mpp, task: "FixUnit50".

Use case: In the mpp we had tasks with different completion and types. Then I added an exception to the standard calendar. TypesWithException.zip

More example with attached mpp. In task "ExceptionMerges" assignment with "Merge4" getTimephasedWork() has returning incorrect values. Tested with mpxj 7.0.2 & 7.2.1. ScheduleAdv.zip

RobertPaasche commented 6 years ago

In our scenario the XML is fine, but MPXJ delivers for a Single Task 180 hours in November and -140 hours in December.

The XML has many TimePahsedWork with zero time and one with 40 hours.

Its seems to be the same Issue like the already reported one. I'm don't able/allowed to provide the files.

GabrielOrAnder commented 6 years ago

Hi guys, i got the same error or something similar:

I'm reading a .mpp file where all the tasks are ok, but when i read ResourceAssignment.TimephasedWork some days came with half time or zero time.

For Example: Task to Set 13 and Set 14, 2 days, 16 hours; TimephasedWork returns: Set 13 with 8 hours and Set 14 with 0 hours.

Edit

Hi Guys,

Testing files with the same issue realized us that the error comes from the MPP files not by library. We notice that Gantt Chart it's ok in the file but Resource Usage did not contain the same information. After correct this difference the MPP file was read correctly.

Bubesz commented 6 years ago

Hi, we also have this problem. In the example file, there is a split from Fri 14:00 to Monday 14:00, however this is read as if it were from Thu 14:00 to Fri 16:00. (Calendars are tricky.)

[TimephasedItem start=Mon Nov 14 15:00:00 UTC 2016 totalAmount=480.0m finish=Thu Nov 17 11:00:00 UTC 2016 amountPerDay=480.0m modified=true], [TimephasedItem start=Thu Nov 17 14:00:00 UTC 2016 totalAmount=0.0m finish=Fri Nov 18 16:00:00 UTC 2016 amountPerDay=0.0m modified=false], [TimephasedItem start=Fri Nov 18 16:00:00 UTC 2016 totalAmount=3840.0m finish=Thu Dec 01 06:00:00 UTC 2016 amountPerDay=480.0m modified=true]

Tested with 7.3.0 Split at wrong position.zip

diegosechin-timenow commented 1 year ago

Hi, could you test it in the last version? We have some problems that looks the same.