It's all about the answers!

Ask a question

OSLC: How to remove parent links?


1
1
Yasuyuki Tominaga (297416) | asked Dec 17 '15, 2:37 a.m.
edited Dec 17 '15, 3:21 a.m.
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?

One answer



permanent link
Yasuyuki Tominaga (297416) | answered Dec 17 '15, 2:41 a.m.
edited Dec 17 '15, 3:18 a.m.
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

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.