It's all about the answers!

Ask a question

How to preserve the sate of the work item when changing its type?

Surender Biyyala (403348) | asked Jan 02 '15, 1:29 p.m.
 Hi All,

We recently created few custom work item types and wanted to change the type of some existing workitems to the newly created one.

when we are changing the type we observe that the state of the work item is not there any way to preserve the state.
 we have the same workflow for both the work items.


Accepted answer

permanent link
Ralph Schoon (62.7k33643) | answered Jan 05 '15, 7:52 a.m.
To keep the state the same, in case the condition Sam mentions in is not given and you change a bunch of work items, you can
  • Export the ID and state to CSV using a query
  • Then bulk change the type
  • Them import the CSV and update the work items

This requires that the state exists in the new workflow.

Surender Biyyala selected this answer as the correct answer

sam detweiler commented Jan 05 '15, 8:02 a.m.

this is how to correct a general problem with incorrectly mapped states, and is the fastest, easiest way.

but it SHOULD work as part of the change type operation.. as long as there is a MATCHING state ID in the change TO type.  none of the workflow 'operations' are executed, just like for like

3 other answers

permanent link
sam detweiler (12.5k6194201) | answered Jan 02 '15, 2:09 p.m.
the state ID MUST be identical, else the system cannot figure out how to map them..
notice this is ID, NOT state NAME

permanent link
Dinesh Kumar B (4.1k413) | answered Jan 02 '15, 1:55 p.m.
edited Jan 02 '15, 2:06 p.m.
its also possible that the start action puts the changed work item to a new state.

from the work flow of the second type > look at the Start Action and the Target State of that start action.

the ability to retain the state when the work item type is changed looks like an rfe to me....

permanent link
Abhinav Mishra (1443039) | answered Jan 05 '15, 2:18 a.m.
edited Jan 05 '15, 2:18 a.m.
Simple way to change the "Workitem Type" is

1.Cilck on the Workitem Icon,List of all woritem types pou- up
2.Select the desired "Workitem Type"

This way the state of the workitem would remain same as of previous workitem type

Your answer

Register or to post your answer.