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

Why are OSLC update requests causing artifact links to disappear?

 I am modifying a Capability workitem's "Planned For" attribute using OSLC requests from VBA.  When I modify the attribute using the following request, all of the linked items under the "Links" page disappear.


<?xml version="1.0"?>
    <oslc_cm:ChangeRequest>
        <rtc_cm:plannedFor>https://<server>/ccm/oslc/iterations/_HaogPoLeEemIA4r_U-X20w</rtc_cm:plannedFor>
    </oslc_cm:ChangeRequest>
</rdf:RDF>

I am using the following headers:

    http.setRequestHeader "Content-Type", "application/xml"
    http.setRequestHeader "Accept", "application/xml"
    http.setRequestHeader "OSLC-Core-Version", "2.0"

And I am sending the request to the following link:

https://<server>:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/12225

When I modify the same workitem/attribute using the web GUI, this does not happen.  Why is this happening and what can I do to avoid it?

0 votes



4 answers

Permanent link

 Try:

<rtc_cm:plannedFor rdf:resource="https://<server>/ccm/oslc/iterations/_HaogPoLeEemIA4r_U-X20w"/>

0 votes

Comments

I just tried it and the same thing happens.  The workitem is updated and the links disappear. 


Permanent link

 you may need to GET the resource, add your property then PUT to do the update. a PUT without a GET may be updating the whole resource, not just patching the properties you changed.


0 votes

Comments
But if thats the case, then why aren't any other attributes changing?  Its just the links that are changing when I change any attribute.


Permanent link

 Try OSLC-Core-Version=1.0

0 votes

Comments

When I try that, I get this as a response:


 debug.Print(workItemDoc.xml)
<?xml version="1.0"?>
    <oslc_cm:status>415</oslc_cm:status>
    <oslc_cm:message>Content type 'application/xml' is not supported.</oslc_cm:message>
</oslc_cm:error>


Permanent link

 Its probably expecting content-type=application/rdf+xml

0 votes

Comments
Nope

<?xml version="1.0"?>
    <oslc_cm:status>406</oslc_cm:status>
    <oslc_cm:message>Content type 'application/rdf+xml' is not supported.</oslc_cm:message>

</oslc_cm:error> 

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
× 516
× 62
× 49

Question asked: Feb 12 '20, 5:17 p.m.

Question was seen: 2,073 times

Last updated: Feb 13 '20, 3:51 p.m.

Confirmation Cancel Confirm