How can I change the Work Item Type created when associating a Change Set with a new Work item?
![]()
I'm looking at implementing a new code review process in our installation of RTC (4.0.7). As part of this I have been looking at existing functionality around the relationships between change sets and work items.
I have found that change sets can be associated with work items from the client in two ways:
Both of these options open a window to select an existing work item or to create a new work item. I am specifically concerned with creating a new work item rather than attaching it to a specific work item.
When I click 'Create a Work item', I am shown a range of work item attribute fields to complete and by doing so I can create a work item. The work item type created is an action.
I would like to be able to create a different work item type (ie non-action) when associating the change set, however despite thorough searching (in Project and Team Area configuration, on Jazz.net and on Google), I cannot find where this can be set.
I believe there are two possible ways to achieve this, either by changing the default work item type created when associating a change set, or prompting for the work item type once the 'Create new work item' button is selected.
These strike me as something which would be possible, can somebody please explain how to do this?
|
Accepted answer
![]()
Hello Jake,
(interesting question)
Verified in the code: when you add a related artifact and select to create a new work item,
our code will fetch all work item types defined in the Project Area,
and will pick-up the first type in the list.
(...)
IWorkItemType workItemType;
if (isWorkItemTypeSet) {
workItemType= fContext.getWorkItemType();
} else {
List<IWorkItemType> workItemTypes = fWorkItemClient.findWorkItemTypes(fContext.getProjectAreaHandle(), subMonitor.newChild(1));
Assert.isTrue(!workItemTypes.isEmpty());
workItemType= workItemTypes.get(0);
}
(...)
With this implementation in mind, the solution for you is to move the item type that you want to see as default in the creation dialog so it becomes the first type in the list.
To achieve this, edit your PA Source, and search for:
<data>
<configuration-data xmlns="http://com.ibm.team.workitem/workitemTypes"
Move your type to the top of the list.
Hope it helps,
Eric
Jake McInteer selected this answer as the correct answer
|
Comments
>I'm looking at implementing a new code review process in our installation of RTC (4.0.7)
I'm not sure if you were aware, but in RTC 6.0 a new Code Review feature was made available.
See:
https://jazz.net/downloads/rational-team-concert/releases/6.0.1?p=news#code-review
https://jazz.net/downloads/rational-team-concert/milestones/6.0.2M3?p=news#rfv-locks