MPPReader12/14: CustomFieldLookupTable is not populated for Resource OutlineCodes
Multi platform library to read and write schedule data
Brought to you by:
joniles
If using MPPReader14 (or MPPReader12) we encountered, that the CustomFieldLookupTable is populated for Task-related OutlineCodes only, while Resource-related values are missing. In result of that, it is not possible to retrieve the select lists of Resource OutlineCodes.
Looking at the source, we found method below in MPPReader14 (Line 208).
It seems, that only Probs of "TBkndTask" are processed here, while Probs of "TBkndRsc" are ignored.
We did a test, adding the DirectoryEntry "TBkndRsc" and we were able to get the select lists of Resource OutlineCodes as expected :)
/**
* This method extracts and collates the value list information
* for custom column value lists.
*/
private void processCustomValueLists() throws IOException
{
DirectoryEntry taskDir = (DirectoryEntry) m_projectDir.getEntry("TBkndTask");
if (taskDir.hasEntry("Props"))
{
Props taskProps = new Props14(m_inputStreamFactory.getInstance(taskDir, "Props"));
CustomFieldValueReader14 reader = new CustomFieldValueReader14(m_file.getProjectProperties(), m_file.getCustomFields(), m_outlineCodeVarMeta, m_outlineCodeVarData, m_outlineCodeFixedData, m_outlineCodeFixedData2, taskProps);
reader.process();
}
}
Simple testfile attached. (Created with MSP 2016)
You can use the follwing code to reproduce the issue:
Last edit: Markus Höger 2021-05-11
Our workaround and possible fix:
Add reading Probs of DirectoryEntry "TBkndRsc" to methods:
analogous to "TBkndTask".
Hi, thanks for the suggestion. I've updated the code in git - hopefully this will now work as expected.
Hi Jon!
Thanks for fast reply and fixing.
It works as expected now :)