Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC The template has an invalid specification of work items and cannot be used.

I have created a work item template(code below) that creates a defect and task record upon completion (works fine)

<?xml version="1.0" encoding="UTF-8"?>
<rtc_cm:WorkItemTemplate xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/"
    xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
    <dc:identifier>com.ibm.team.workitem.template1</dc:identifier>
    <dc:title>Defect with FOO</dc:title>
    <dc:description>This template creates a Defect plus a child work item that can contain protected FOO.
    </dc:description>
    <rtc_cm:workItems>
        <rtc_cm:defect rdf:ID="item0">
            <rtc_cm:filedAgainst rdf:resource="${filedAgainst:Category}" />
            <oslc_cm:severity>severity.literal.l4</oslc_cm:severity>
            <dc:title>Defect Summary Here</dc:title>
        </rtc_cm:defect>
        <rtc_cm:task rdf:ID="item1">
            <rtc_cm:filedAgainst rdf:resource="FOO Access" />
            <dc:description>This item contains FOO.</dc:description>
            <dc:title>FOO Item</dc:title>
            <rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent
                rdf:resource="#item0" />
        </rtc_cm:task>
    </rtc_cm:workItems>
</rtc_cm:WorkItemTemplate>

This works fine (creates the defect and the task) yet if I change
<rtc_cm:task rdf:ID="item1">      to        <rtc_cm:anothertype rdf:ID="item1">

I get the error:
"The template has an invalid specification of work items and cannot be used."

I have tried to create the another type as a copy(well mimmic) of OOTB task and or defect types and still seems to complain  


0 votes



2 answers

Permanent link
Hi Fred,
Is there any particular reason why you were performing this operation in the code? I would suggest you using ui to create the template instead.

0 votes


Permanent link
Are you using RTC Eclipse to import the work item templates created in a format specified in this document?
https://jazz.net/wiki/bin/view/Main/WorkItemTemplates

If so, I can't see the relationship between a working copy and a problematic copy as they should be completely separate.

If you did change the content in the same file, double check that you add/modify the end tag </ rtc_cm:anothertype> for <rtc_cm:anothertype>. Also, make sure that the other type does have an attribute "filedagainst".

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: May 28 '15, 10:03 a.m.

Question was seen: 3,108 times

Last updated: May 29 '15, 6:52 a.m.

Confirmation Cancel Confirm