Programatically Create work items from a work item Template
Hi,
I am creating an post operation participant for project initialization which will create some work items when the project is initialized.
Question 1: Which extension point do i have to extend?
Question 2: Is it possible to create work items programatically from a work item template already defined in the project?
Awaiting a reply.
Warm Regards,
Arun
|
Accepted answer
Hello,
For your second question, I would say to use IWorkItemTemplateClient. IWorkItemTemplateClient witc = (IWorkItemTemplateClient) repo.getClientLibrary(IWorkItemTemplateClient.class); IWorkItemTemplateHandle templateHandle = witc.getTemplateHandle("Identifier", projectAreaHandle, monitor); int[] actualIDs = witc.instantiateTemplate(templateHandle, Collections . < IAttributeVariable, Object> emptyMap(), monitor); I now just let you find out what to put in the second attribute (didn't check) of instantiateTemplate method. Please also not I didn't test the code I've wrote here. It might need some adjustment. Regards, Sylvain Ralph Schoon selected this answer as the correct answer
|
2 other answers
Hi Arun,
1. https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation explains how to programmatically create work items. 2. Great question! I did a quick search, and I didn't find any examples. It seems like it should be possible. Perhaps someone else will know how to do this. |
Thanks Sylvain for providing probable code to access template and create workitems as per template
Hi Arun Batra,
Have you find answer to the question you were looking for?
Even I have the same requirement in my project.Need to create work items using rtc work item templates
Request you to please post the code in case you have accomplished it
Thanks in advance!
Regards,
Harshal
|
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.