It's all about the answers!

Ask a question

Top Level Items, Childs and Parents


Christopher Zuendorf (6162) | asked Sep 26 '08, 4:00 a.m.
Hi!

Is it possible to set the child of a work item programmatically?
I want to create a user story and define tasks as childrens of it.
Is this possible with a plain-Java-Application?

Greetz Keagen

2 answers



permanent link
Patrick Streule (4.9k21) | answered Sep 26 '08, 4:20 a.m.
JAZZ DEVELOPER
Is it possible to set the child of a work item programmatically?
I want to create a user story and define tasks as childrens of it.
Is this possible with a plain-Java-Application?

Yes, this is possible. Some pseudo-code:

IWorkItemClient client=...
IWorkItem story=...
IWorkItemReferences references= client.resolveWorkItemReferences(story,
monitor);
for (IWorkItem task : childTasks) {
IItemReference reference=
WorkItemLinkTypes.createWorkItemReference(task);
references.add(WorkItemEndPoints.CHILD_WORK_ITEMS, reference);
}

Please see
https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation for
more information about creating work items in a plain-Java environment.

HTH,
Patrick
Jazz Work Item Team

permanent link
Christopher Zuendorf (6162) | answered Sep 30 '08, 5:36 a.m.
It works =)

Your answer


Register or to post 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.