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

How to update an unassigned enumeration attribute using web APIs

Hello,

Normally it is possible to update an attribute in RTC using OSLC with a PUT request.  For instance to update an enumeration list attribute on workitem 31389, I could send the following as a PUT:

URL:
https://my.rtc:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/31389

Request body:
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:oslc="http://open-services.net/ns/core#"
    xmlns:j.0="https://my.rtc:9443/ccm/oslc/context/_2KmWk641EeSEpKaM_mUNZQ/shapes/workitems/"
    xmlns:j.1="http://open-services.net/ns/cm-x#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:j.3="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
    xmlns:j.2="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/">
  <j.0:task rdf:about="https://my.rtc:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/31389">
    <j.2:customMultiSelect rdf:resource="https://my.rtc:9443/ccm/oslc/enumerations/_2KmWk641EeSEpKaM_mUNZQ/enumerationList$customEnum/customEnum.literal.l3"/>
    </j.0:task>
</rdf:RDF>

If a value was already set on the attribute, my item will be returned and list the updated value, but if the attribute was unassigned, I will get the following error when I try to set an initial value:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:oslc="http://open-services.net/ns/core#" >
    <rdf:Description rdf:nodeID="A0">;
        <oslc:message>assertion failed: </oslc:message>
        <oslc:statusCode>500</oslc:statusCode>
        <rdf:type rdf:resource="http://open-services.net/ns/core#Error"/>;
    </rdf:Description>
</rdf:RDF>

This appears to effect both enumerations and enumeration list attributes.  Is there anyway to assign a value to an enumeration atttribute that does not already have a value assigned?

1

0 votes


Be the first one to answer this question!

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
× 10,934
× 515
× 478
× 457

Question asked: Feb 27 '15, 5:32 p.m.

Question was seen: 4,535 times

Last updated: Feb 27 '15, 6:11 p.m.

Confirmation Cancel Confirm