It's all about the answers!

Ask a question

how to get DuplicateOf/Duplicates WI ids


Roger Layani (5313238) | asked Sep 20 '11, 3:09 a.m.
is there a way to get DuplicateOf/Duplicates WI ids using OSLC ?

One answer



permanent link
Rena Long (2024) | answered Mar 01 '12, 3:42 p.m.
$prodDefectquery = $ref->{'oslc_cm:changeRequests'}{'oslc_cm:simpleQuery'}{'oslc_cm:url'};

$cmd = "curl -s -k -b $cookies -o ./prod_defectquery.$$ -H \"accept: application/x-oslc-cm-change-request+xml\"
\"${prodDefectquery}?oslc_cm.query=id=${wi}&oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.duplicateworkitem.duplicateOf,rtc_cm:com.ibm.team.workitem.linktype.duplicatework
item.duplicates\"";

In the output file, you will see something like:

rtc_cm:com.ibm.team.workitem.linktype.duplicateworkitem.duplicateOf oslc_cm:collref="URI/oslc/workitems/_GK5iQFNWEeG-2-7002zNIA/rtc_cm:com.ibm.team.workitem.linktype.duplicateworkitem.duplicateOf"
rtc_cm:com.ibm.team.workitem.linktype.duplicateworkitem.duplicates oslc_cm:collref="URI/oslc/workitems/_GK5iQFNWEeG-2-7002zNIA/rtc_cm:com.ibm.team.workitem.linktype.duplicateworkitem.duplicates"

You can then extract the URI link and run another curl command on that URI to get the information about the duplicates.


is there a way to get DuplicateOf/Duplicates WI ids using OSLC ?

Your answer


Register or to post your answer.