It's all about the answers!

Ask a question

Creating workitems through java code


Arshad Adavani (231110) | 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!

Regards,
Arshad

One answer



permanent link
Ralph Schoon (56.0k23642) | answered Mar 21 '16, 8:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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 "com.ibm.team.apt.workItemType.story".

Your answer


Register or to post your answer.