It's all about the answers!

Ask a question

Need some help with workitem templates


Namit Pande (6311319) | asked Jul 21 '22, 11:48 a.m.

Hello,

I am trying to create a Defect work item using a work item template. I want to link the Defect work item to a task work item by associating the task work item as a parent to the defect. I am adding a prompt for the work item ID of the parent WI (task) that I want to later use for linking. I am able to get the work item created but the parent-child link is not getting set.

Here is the template code:

<?xml version="1.0" encoding="UTF-8"?>
<dc:identifier>com.ibm.team.workitem.template6</dc:identifier>
<dc:title>Submit Defect w Parent (Task) Link</dc:title>
<dc:description/>
<rtc_cm:workItems>
<rtc_cm:defect rdf:ID="item0">
<rtc_cm:WorkItemTemplateParameter default="Enter short description of the Defect" id="Summary" name="Summary"/>
<rtc_cm:WorkItemTemplateParameter default="Enter Parent (task) ticket number" id="id" name="id"/>
<rtc_cm:plannedFor rdf:resource="${plannedFor:Iteration}"/>
<rtc_cm:filedAgainst rdf:resource="${filedAgainst:Category}"/>
<dc:title>Parent WI ${id}: ${Summary}</dc:title>
<rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent rdf:ID="${id}"/>
</rtc_cm:defect>
</rtc_cm:workItems>
</rtc_cm:WorkItemTemplate>

Please let me know what am I missing. Thanks in advance.

Regards.
NP

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Jul 25 '22, 7:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 I would suggest to check with the documentation: 



also



I am pretty sure there is no prompt mechanism to prompt for a work item ID. My assumption is that you would have to design the template in such a way that you select the parent work item and then create and link the client work item using the template.

Namit Pande selected this answer as the correct answer

Comments
Namit Pande commented Jul 28 '22, 4:11 p.m.

Thanks Ralph for your valuable advise as always. I will review the resources and work per your suggestion. 

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.