Closed alex-matatov closed 1 year ago
@alex-matatov thanks for investigating and documenting these issues. I have applied fixes for both of them.
The fix for the WBS hierarchy is based loosely on your original code, although I've made the addition of a new parent WBS entry a temporary thing, so in theory the the schedule objects will be unchanged after they have been written to an XER file. I also ensured that any top level activities were also made children of the new WBS entry to ensure that the whole schedule is seen as being "pushed down" the hierarchy by one level. Without this change activities and WBS entries which were originally at the same level of the hierarchy would have ended up split across different levels - hope that makes sense!
Hi Jon,
Thank you for the quick fix and looking forward for the new mpxj version!
Cheers, Alex
New version available now with this change.
Hi Jon,
I just checked - it works!
Cheers, Alex
I noticed that in some cases P6 xer file could not be imported to P6/Desktop (however the same project exported as xml via PrimaveraPMFileWriter could be imported without any issue):
Case 1
When a
MPXJ/ProjectFile
has 2 or more WBS (MPXJ/Task
) without parent (root ones). In this case P6/Desktop fails to import xer with error like that:P6/Desktop successfully imports XML file with 2 WBS without parent. When P6/Desktop exports this Project as XER it adds an additional root WBS with wbsName == projectName and adds these 2 WBS as children.
Basically, I think the code below could be a fix in
PrimaveraXERFileWriter
Case 2
When
Task.name
orResource.name
has"
character (for example15" pipe
) and PrimaveraXERFileWriter writes it as it then P6/Desktop can't import it or displays a record weirdly.Basically,
"
characters should be escaped (doubled ->15"" pipe
) otherwise XER format is broken.