It's all about the answers!

Ask a question

Creating workitems through java code

Arshad Adavani (231220) | asked Mar 21 '16, 7:07 a.m.
Hi All,

I am trying to create work items through code. I got some help in the net and used the same code.

I have used this line:
IWorkItemType workItemType = workItemClient.findWorkItemType(projectArea, typeIdentifier, null);
where type identifier can be a "task" or "defect". It works fine for these 2 but not for other work item types.

What typeIdentifier do I have to pass if I want to create a work item of type Change Request. These mappings available somewhere for all the work item types?

Thanks for any help!


One answer

permanent link
Ralph Schoon (62.7k33643) | answered Mar 21 '16, 8:10 a.m.
It works for all types, provided you know the type identifier. The type identifier can for example be found in the Eclipse or web project administration UI:

You can see that the ID does not have to be even similar to the name of the type. In case of this project areas process a Story work item type has the ID "".

Your answer

Register or to post your answer.