It's all about the answers!

Ask a question

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


Surender Biyyala (402548) | 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 preserved.is there any way to preserve the state.
 we have the same workflow for both the work items.

Thanks,
Surender

Accepted answer


permanent link
Ralph Schoon (61.4k33643) | answered Jan 05 '15, 7:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
To keep the state the same, in case the condition Sam mentions in https://jazz.net/forum/questions/170873/how-to-preserve-the-sate-of-the-work-item-when-changing-its-type/170875 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

Comments
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.5k6189201) | 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.
JAZZ DEVELOPER
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 (1442839) | 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"
3.Save


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

Your answer


Register or to post your answer.