It's all about the answers!

Ask a question

RTC Defect Type A- to Defect type B conversion with out losing the history.


Mohanraj Ragupathi (54520) | asked Dec 18 '15, 8:29 a.m.
edited Dec 18 '15, 8:31 a.m.

Hi, we are using RTC 5.0.2 with SCRUM template

One of the Big program is going to have an elaborate Defect workflow and customer exchange related fields. To support this activity, we plan to have a new Defect TYPE (say it as “Defect-B”) with the same fields and values as like in the existing Defect (say it as “Defect”).

Existing “Defect” is having a simple workflow – New, In Progress, Resolved, Closed
“Defect-B” is having equivalent workflow – Analysis, Implemented, Integrated, Validated, Closed. (we have few more states which are new). Here I duplicated the “Defect” workflow and maintained the New, In Progress, Resolved states.

Now we have lot of “Defect” workitem in that project area which need to be converted to "Defect-B" type. Before that I exported the “Defect” work items with all necessary fields. These Defects are in different states.

I want to create “Defect-B”  (with new category – NOT same defect category) with New workflow and extra fields. When I change the “Defect” TYPE to “Defect-B”, though the “Defect” is in “Resolved” state, when it became “Defect-B”, automatically it revert back to “Initialize” state – i.e. “Analysis” (which is configured as Initialize target state).  In this condition, RTC tool automatically clears “Resolution date” details. If I map the data in exported excel and import it with latest details, it is working fine. But the “Resolution” date and “Resolved By” details are replaced with current time and my name.

To avoid the loss of data, is it possible to change the Defect TYPE through excel import??? I tried with “Mapping” xml file as well. It is not working.  Do you have any suggestion????

 NOTE:  We are going to have both "Defect" and "Defect-B" in a common template. So the future programs based on the need they can select one of the "Defect" type for their program. So don't want to RENAME the existing "defect" as "defect-B".

2 answers



permanent link
sam detweiler (12.5k6195201) | answered Dec 18 '15, 9:56 a.m.
Why export/import? why not just change the workitem type?
you cannot change the type of an existing workitem thru import.  you can set a NEW workitem's type.

the problem will be matching states. cause as you convert, it will want to get 'In progress' to something.  etc.

and yes, if you set a new state that is not effectively resolved, then the old resolved status are cleared.
and any changes are marked as done by the user running the import tool.



permanent link
Mohanraj Ragupathi (54520) | answered Dec 21 '15, 2:53 a.m.
 After modifying the source id of the attributes i.e. instead of name used literal ID in the mapping file, now I am able to export "defect" in to excel and use the same file to import but with mapping file, convert it to "defect-B" with new "State" names. Nothing else is changed in the work item.

The "defect" type "exported" data.
========================================
Type Id Status Priority
defect 329364 2 Medium
defect 329361 3 Medium
defect 329362 1 Unassigned
defect 329365 2 Medium
defect 10215 3 Medium
========================================


This is the mapping file used - Please be careful on the "Type" and "Status". If you use "State" instead of "Status", the mapping will not work.
============================================================================
<?xml version="1.0" encoding="UTF-8"?>
<mapping version="1">
<!--
Usage:
- Specify the mapping between source attributes/values to Jazz attributes/values
- Removal of an <attribute> element will disable the import of the corresponding attribute
- If no explicit mapping for a value exists the mapping for source id "*" will be used if it exists
- Using source id "*" with an empty target id can be used to ignore unknown values
Limitations:
- Import of some attributes is still hard-coded
- Some attributes are not supported for import
-->
<attribute sourceId="Type" targetId="com.ibm.team.workitem.attribute.workitemtype">
<value sourceId="defect" targetId="defect-B"/>
</attribute>
<attribute sourceId="Status" targetId="com.ibm.team.workitem.attribute.state">
<value sourceId="1" targetId="com.visteon.defect-b.workflow.state.s7"/>
<value sourceId="2" targetId="com.visteon.defect-b.workflow.state.s8"/>
<value sourceId="3" targetId="com.visteon.defect-b.workflow.state.s9"/>
</attribute>
</mapping>
============================================================================
Hope this will be helpful.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.