Hi,
it would be really cool if MPXJ would support OutlineCodes in the way that MS Project needs!
As far as i can see, MPXJ provides some setters/getters for outline codes, but the resulting xml files do not fit to the MSPDI schema:
<Project xmlns="http://schemas.microsoft.com/project">
..
<ExtendedAttributes>
<ExtendedAttribute>
<FieldID>188744096</FieldID>
<FieldName>Outline Code1</FieldName>
</ExtendedAttribute>
</ExtendedAttributes>
..
<Tasks>
<Task>
..
<ExtendedAttribute>
<FieldID>188744096</FieldID>
<Value>value</Value>
</ExtendedAttribute>
..
</Task>
</Tasks>
</Project>
When exporting from MS Project 2003 or 2007 the resulting file looks instead something like this:
<Project xmlns="http://schemas.microsoft.com/project">
..
<OutlineCodes>
<OutlineCode>
<FieldID>188744096</FieldID>
<FieldName>Outline Code1</FieldName>
<Values>
<Value>
<ValueID>1</ValueID>
<ParentValueID>0</ParentValueID>
<Value>value</Value>
</Value>
..
</Values>
..
</OutlineCode>
</OutlineCodes>
..
<ExtendedAttributes>
<ExtendedAttribute>
<FieldID>188744096</FieldID>
<FieldName>Outline Code1</FieldName>
</ExtendedAttribute>
</ExtendedAttributes>
..
<Tasks>
<Task>
..
<OutlineCode>
<UID>1</UID>
<FieldID>188744096</FieldID>
<ValueID>1</ValueID>
</OutlineCode>
..
</Task>
</Tasks>
</Project>
Maybe i missed something, but anyway this would be a real killer feature for us ;-)
No problem, I'll look at this once I've completed the current set of changes I'm working on in MPXJ.
Jon
My work day was spent fixing this. Attached is a patch.
The following code is how I make sure that the TaskFieldValueList for the outline codes is properly set. Just make sure you set your outline codes on all tasks before this.
It might be worth to include into MPXJ aswell.
Is there a problem with that patch?
Hi Jon. Can't comment on the viability of Lord H's patch, but I'm +1'ing the original request!