It's all about the answers!

Ask a question

Custom enumeration type in RTC can not be seen with OSLC.


Dinyo Dinev (311235) | asked Sep 28 '15, 7:12 a.m.
Hi, I am using RTC 6.0.1M1 and I need to create work item with custom attribute  with attribute type - enumeration.
So I go to the Manage Project Areas-> WorkItem - > Enumeration - > Add... and create my custom enumeration with name _TextType with 4 values and one of them is default.

Then go to create Custom Type
Manage Project Areas-> WorkItem - > Types and Attributes -> Add... and add my type as new attribute with my custom type.

Then when I tried to read the the allowed values from the shape I see:

<rdf:Description rdf:about="https://10.0.2.79:9443/ccm/oslc/context/_tsVvMWWwEeWQIIEAtKgWEg/shapes/workitems/custom/property/CustomAtrribute">
        <rdf:type rdf:resource="http://open-services.net/ns/core#Property"/>
        <oslc:valueType rdf:resource="http://open-services.net/ns/core#Resource"/>
        <oslc:representation rdf:resource="http://open-services.net/ns/core#Either"/>
        <oslc:readOnly rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc:readOnly>
        <oslc:propertyDefinition rdf:resource="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/CustomAtrribute"/>
        <oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-many"/>
        <oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">CustomAtrribute</oslc:name>
        <oslc:defaultValue>[]</oslc:defaultValue>
        <dcterms:title rdf:parseType="Literal">CustomAttribute</dcterms:title>
    </rdf:Description>

Why there is no allowedValues and the default value is empty. Why this is happening?
for example other attribute form the same shape looks like:
<rdf:Description rdf:about="https://10.0.2.79:9443/ccm/oslc/context/_tsVvMWWwEeWQIIEAtKgWEg/shapes/workitems/custom/property/workItemType/allowedValues">
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/custom"/>
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/com.ibm.team.workitem.workItemType.impediment"/>
        <rdf:type rdf:resource="http://open-services.net/ns/core#AllowedValues"/>
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/defect"/>
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/com.ibm.team.workitem.workItemType.retrospective"/>
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/com.ibm.team.apt.workItemType.story"/>
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/task"/>
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/com.ibm.team.apt.workItemType.epic"/>
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/com.ibm.team.workItemType.buildtrackingitem"/>
        <oslc:allowedValue rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_tsVvMWWwEeWQIIEAtKgWEg/com.ibm.team.workItemType.adoption"/>
    </rdf:Description>





Comments
Donald Nong commented Sep 28 '15, 10:27 p.m.

I tested in the jazz.net sandbox (6.0.1 M4) and did not see such problem. How did you get your resource document? I did not see any word "custom" in my case so I think we may do it quite differently.


Dinyo Dinev commented Sep 29 '15, 3:19 a.m.

Hi, Donlad I can not add pictures here(only share them), so I will try to explain in more details.
1. From ...workitems/catalogĀ  I get the Service Provider's URI for the project
2. Then I found the Creation Factory for the Defect(work Item in which I add my custom attribute) I get the ResourceShape URI.
3. Then I search for customAttributeID which is the ID of my attribute
https://www.dropbox.com/s/e5gtzod8qlx3a7x/postResponse.JPG?dl=0
https://www.dropbox.com/s/u55m8kmulabj5cm/RTC.JPG?dl=0
https://www.dropbox.com/s/m3azvw86bicuwk3/Enumeration.JPG?dl=0


Dinyo Dinev commented Sep 30 '15, 3:44 a.m.

Hi, I created again new Enumeration but the name do not start with _(under score) and now I can get allowed values.

Be the first one to answer this question!


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.