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

OSLC: How to remove parent links?

I can add/change parent links by using "PUT":
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230
<rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent rdf:resource="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/232"/>
But I can't delete parent links using that. How can I delete parent links using OSLC?

1

1 vote



One answer

Permanent link
You can use "?oslc_cm.properties" URL parameter.

(1)get the current parent links.
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent
* OSLC-Core-Version: 2.0  
* Accept: application/rdf+xml

Result of "GET" example
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc_cm="http://open-services.net/ns/cm#">
<oslc_cm:ChangeRequest rdf:about="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent">
<rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent rdf:ID="n0" rdf:resource="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/232"/>
</oslc_cm:ChangeRequest>
<rdf:Description rdf:about="#n0">
<dcterms:title>232: title of 232 </dcterms:title>
</rdf:Description>
</rdf:RDF>
(2)modify the "GET" result removing parent links.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc_cm="http://open-services.net/ns/cm#">
<oslc_cm:ChangeRequest rdf:about="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent" />
</rdf:RDF>

(3)send the modified contents using "PUT"
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent
* OSLC-Core-Version: 2.0   
* content-type: application/rdf+xml  

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc_cm="http://open-services.net/ns/cm#">
<oslc_cm:ChangeRequest rdf:about="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent" />
</rdf:RDF>

* Reference: https://jazz.net/forum/questions/98302/oslc-how-to-remove-subscribers-with-oslc

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

Question asked: Dec 17 '15, 2:37 a.m.

Question was seen: 3,581 times

Last updated: Dec 17 '15, 3:21 a.m.

Confirmation Cancel Confirm