It's all about the answers!

Ask a question

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


Fred Bickford (281732) | asked May 28 '15, 10:03 a.m.
JAZZ DEVELOPER
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  


2 answers



permanent link
Krzysztof Ka┼║mierczyk (7.5k477103) | answered May 28 '15, 10:22 a.m.
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.

permanent link
Donald Nong (14.5k414) | answered May 29 '15, 6:52 a.m.
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".

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.