Work Item Creation from Server Side Plugin.
Accepted answer
11 other answers
here is how to find the category choices.. (all found by looking at the Javadoc)
IWorkItemCommon.findCategories(IProjectAreaHandle, ItemProfile, org.eclipse.core.runtime.IProgressMonitor)
to get the target iteration, you need to find them.. starting at project
IDevelopmentLineHandle getProjectDevelopmentLine()
then u can get the iterations from the development line
IIterationHandle[] getIterations()
then u can analyze the iterations and decide which one to pick
Sam
IWorkItemCommon.findCategories(IProjectAreaHandle, ItemProfile, org.eclipse.core.runtime.IProgressMonitor)
to get the target iteration, you need to find them.. starting at project
IDevelopmentLineHandle getProjectDevelopmentLine()
then u can get the iterations from the development line
IIterationHandle[] getIterations()
then u can analyze the iterations and decide which one to pick
Sam
Ralph,
I am confused, The code in the mentioned link is Client side or server side.
I want to add code for creating TASK Work item in a different project area when changing a status of a work item to COMPLETED.
No need to get the repository parameters as I want to create WI in the same repository where the Plugin executes.
This should be done by Operation Participant. But I need just a algorithm at least.
Thanks
I am confused, The code in the mentioned link is Client side or server side.
I want to add code for creating TASK Work item in a different project area when changing a status of a work item to COMPLETED.
No need to get the repository parameters as I want to create WI in the same repository where the Plugin executes.
This should be done by Operation Participant. But I need just a algorithm at least.
Thanks
This WiKi entry should get you started: https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation
I assume you have looked at the articles around Extending Team Concert and the Extensions workshop in https://jazz.net/library/ already.
Hi,
When using the createWorkItem2 method, I have to assign the value for all mandatory fields before saving the work item.
But every time I am getting struck when assigning the values to fileds like Category and Planned For.
How to pass the values to this fields using workItem.setTarget and workItem.setCategory methods.
Now my total code look some thing like this
When using the createWorkItem2 method, I have to assign the value for all mandatory fields before saving the work item.
But every time I am getting struck when assigning the values to fileds like Category and Planned For.
How to pass the values to this fields using workItem.setTarget and workItem.setCategory methods.
Now my total code look some thing like this
// TEST Creation of WorkItem
IProcessServerService processServerService = getService(IProcessServerService.class); ;
IWorkItemServer workItemServer = getService(IWorkItemServer.class);
IProjectArea projectArea = (IProjectArea)processServerService.findProcessArea("TAM Regression", null);
IWorkItemType workItemType = workItemServer.findCachedWorkItemType(projectArea, "Task");
IWorkItem workItem = workItemServer.createWorkItem2(workItemType);
// Set the Attributes of Task work item.
workItem.setHTMLSummary(SourceWI.getHTMLSummary());
ICategoryHandle FiledAgainst = ????;
workItem.setTarget(????);
workItem.setCategory(????);
workItemServer.saveWorkItem2(workItem, null, null);
and this topic where I posted guidance too..
https://jazz.net/forums/viewtopic.php?t=25208&highlight=create+workitem
Thanks Sam.
I almost completed the Work Item creation. Once I deployed the plugin, Will give you the feedback tomorrow.
I almost completed the Work Item creation. Once I deployed the plugin, Will give you the feedback tomorrow.
here is how to find the category choices.. (all found by looking at the Javadoc)
IWorkItemCommon.findCategories(IProjectAreaHandle, ItemProfile, org.eclipse.core.runtime.IProgressMonitor)
to get the target iteration, you need to find them.. starting at project
IDevelopmentLineHandle getProjectDevelopmentLine()
then u can get the iterations from the development line
IIterationHandle[] getIterations()
then u can analyze the iterations and decide which one to pick
Sam
Sam
After some modification here and there in the above mentioned code, Work item is creating properly with the values supplied from the java.
Thanks!!!
After some modification here and there in the above mentioned code, Work item is creating properly with the values supplied from the java.
Thanks!!!
Comments
showing 5 of 7
show 2 more comments
page 1of 1 pagesof 2 pages
Comments
Nikhil Bharti
Nov 27 '12, 8:04 a.m.Muthukumar C
Nov 27 '12, 8:15 a.m.