joniles / mpxj

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

PrimaveraPMProjectWriter: set "ResourceAssignment.ResourceType" tag #685

Closed alex-matatov closed 3 months ago

alex-matatov commented 3 months ago

Hi Jon,

There is a small MPXJ/P6-XML ResourceAssignment export issue…

Primavera P6 wants to see ResourceAssignment.ResourceType attribute in XML file. Otherwise it shows all ResourceAssignments as Labor . For XER everything is fine.

image

Hopefully, the fix is really simple and trivial. It is just enough to add the line below to mpxj/src/main/java/net/sf/mpxj/primavera/PrimaveraPMProjectWriter.java

private void writeAssignment(ResourceAssignment mpxj) {
….
xml.setResourceType(ResourceTypeHelper.getXmlFromInstance(mpxj.getResource().getType()));

Do you think it would be possible to do ?

Cheers, Alex

joniles commented 3 months ago

Done! The change will be available in the next release, hopefully in the next few days.

alex-matatov commented 3 months ago

Thank you!