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

how to get DuplicateOf/Duplicates WI ids

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

0 votes



One answer

Permanent link
$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 ?

0 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
× 10,929

Question asked: Sep 20 '11, 3:09 a.m.

Question was seen: 6,220 times

Last updated: Sep 20 '11, 3:09 a.m.

Confirmation Cancel Confirm