It's all about the answers!

Ask a question

Creating Child Work Item from Context Menu


Simon Fisher (1631710) | asked Nov 04 '08, 5:03 p.m.
JAZZ DEVELOPER
Hi,

I'd like to be able to create a child Work Item by right clicking a work item in the work items view and selecting a context-sensitive menu item. Upon creation of this child work item some of the fields should automatically be copied over from the parent (Summary, severity etc), and then the work item editor opened to give the ability to make changes before committing to the repository. What I'd like to know is:

1. Has anyone done this already?
2. If not is it possible via plug in development?
3. If so, what classes should I be looking to extend/use for this?
4. As far as I understand it would be entirely client side - no custom development on the server side - is this right?

Thanks,

Simon

Edit: I'd also like the parent/child link to be created automatically - can this be done?

5 answers



permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Nov 05 '08, 5:12 a.m.
JAZZ DEVELOPER
Hi
This exact scenario is not possible, you can however use the 'Duplicate' context menu action: This creates a work item with some fields pre-populated. If you would like this work item to be a child, you could then easily add a 'Parent' link in quick information by using d&d and the 'Copied From' link.

Regards

Marcel
Jazz Work Item team

permanent link
Simon Fisher (1631710) | answered Nov 05 '08, 12:30 p.m.
JAZZ DEVELOPER
Ok so I've managed to set up an action that will duplicate certian attributes + create a link, but need to know how to copy attachments over (if this is possible). Which classes do I need to reference?

Thanks again,

Simon

permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Nov 06 '08, 3:40 a.m.
JAZZ DEVELOPER
Attachments are references, like other links are, too. Without involving java code, you can use d&d in Quick Information to 'copy' an attachment to a different work item. If you would like to do this programmatically, you have to create a new reference with the AttachmentHandle and the correct Link Type and add that reference to the list of references on the work item. The code that does this for D&D in Quick Info is in LinkHelper#AddLinkToEndPointAction.

Regards

Marcel
Jazz Work Item team

permanent link
Simon Fisher (1631710) | answered Nov 06 '08, 9:25 a.m.
JAZZ DEVELOPER
Thanks for your help - I'd like to do it programmatically but can't find the class - is Javadoc available for the Jazz/RTC APIs?

Thanks,

Simon

permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Nov 06 '08, 9:50 a.m.
JAZZ DEVELOPER
You can download the RTC source from the download page on jazz.net and create javadoc from that source. However many internal classes (inlcuding LinkHelper) do not have javadoc. But you can at least have a look at the code.

Regards

Marcel
Jazz Work Item team

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.