This technote provides troubleshooting to use when you create or edit a work item in IBM Rational Team Concert (RTC) and notice that some enumeration-type attributes are not showing any literal values for selection
When you create a new work item or edit an existing one, you notice that one or more enumeration-type attributes are not displaying any literals in the dropdown list. This occurs although the enumeration type associated with the attributes contains some literals.
Steps to reproduce:
- Create a project from Scrum template
- Navigate to the project's Process Configuration tab > Project Configuration > Work Items > Enumerations
- Create a new enumeration named 'Custom Priority'. Set the ID to customPriority
- Add the following enumeration literals to the newly created enumeration:
- Name: P1 External Value: P1
- Name: P2 External Value: P2
Note: At this point, it will not be possible to find out what is incorrect by looking at the project's process configuration since the enumeration ID is consistent across all the places that it occurs in the process configuration source.
The enumeration ID has changed. The work item XML output from the steps in the 'Diagnosing the Problem' section shows enumeration ID as 'customPriority', while the project's process configuration source shows 'customPriority_new'. This issue can be created only when updating the process XML directly. Changing enumeration ID is not allowed from the user interface. Enumeration ID and custom attribute ID can be defined at creation. They cannot and should not be changed.
Diagnosing The Problem
The following steps can be used to retrieve details of a work item:
- Log in to IBM Rational Change and Configuration Management (CCM)
- Identify work item ID of a work item that has the problem (one that does not display enumeration literals for selection)
- Replace <server:port> in the following URL with your CCM server/port. Replace <workitem_ID> with the work item ID from step #2
- Paste the URL in a web browser. This should generate XML output
- Search for customPriorityAttribute. You will find an entry similar to the one below.
Refer to the scenario described in the 'Symptom' section above, the attributeType value of the custom attribute 'customPriorityAttribute' is still showing as 'customPriority', which is the original enumeration ID used at the time the custom attribute was created.
Resolving The Problem
When a custom enumeration attribute is created, it uses the enumeration ID at that time as its attributeType. If enumeration ID changes, a new custom attribute will have to be created to map to the new enumeration ID.
To avoid running into this issue, do not change attribute or enumeration IDs in the process template.
There are 2 options to solve the problem on existing projects:
- Change the enumeration ID in the project's process configuration source back to the original value. You will have to ensure that the enumeration has not been used to create new custom attribute after the change of ID.
- Recreate a custom attribute for the work item type using the steps below:
- Ensure that the enumeration ID in the process template is the one you want to use. The ID should have no space in it. Avoid special characters in the ID.
- Remove existing custom attributes that reference the old enumeration ID. From the sample XML output in the 'Diagnosing the Problem' section, the attribute that is referencing the old enumeration type ID: customPriority is 'customPriorityAttribute'. This is the attribute to be removed.
- Create new custom attributes to replace the ones removed in step#2. Note that the custom attribute IDs must be different than the ones listed in step#2.
- Edit the work item's presentation to include the newly created attributes.
- Synchronize Attributes to the existing work items in the project area. Refer to technote #1372230: How to make new custom attributes available in existing Work Items
The Jazz based products have an active community that can provide you with additional resources. Browse and contribute to the User forums, contribute to the Team Blog and review the Team wiki.
Rational Team Concert
16 June 2018