Enumeration literal id displayed in workitem instead of name
We are programmatically populating enumerations in the project area source XML. We have customized workitem types which show these enumerations. The project area updation happens at regular intervals as defined by the sync cycle in our connector to update new enumeration values. Now when we save a new workitem of this customized type in RTC 4.0.1, sometimes literal ids are displayed instead of the name. Ex - levelName.literal.l80 is shown for level name custom attribute. Also levelName.literal.l80 literal id is not found in the project area source xml.
Wonder if this is related to simultaneous updation and reading of the project area XML which is leading to inconsistency in these values?
Wonder if this is related to simultaneous updation and reading of the project area XML which is leading to inconsistency in these values?
2 answers
This only happens if someone removes the underlying enumeration value from the process XML while the work item attribute is still referencing that value. RTC only stores the enumeration IDs in the database and so at runtime it tries to resolve the ID against the value in the XML in order to figure out the display name. In this case, because the value has been removed, it just defaults to displaying the ID.
If you look at the history of your process configuration it should help you to figure out who removed the value and when. To see the history open the process source tab in eclipse then right-click -> Show history.
As far as I am aware, programmatic modification of the process XML is discouraged. There are not even minimal consistency checks possible that might be built into the API. And this can cause all kinds of problems, one of which you seem to see.
Comments
Can we expect some solution to this? We need to modify the process XML in our connector during the synchronization to reflect updated values of enumerations got from CMVC.
You would have to ask for an enhancement if you would want this. I am however not convinced that it will be agreed to. I am not really sure if you have to modify the XML. I would assume there is an API for this. The Eclipse client provides this capabilities and uses its own API to do it. It is however probably internal.