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

creating parent - child link using OSLC API

I'm trying to create parent - child link using OSLC link.
althogh the cURL script does not show any error but it does not update the work-items.

Is it not possible to create parent - child link using OSLC ?

here is the script:

$URL2 = "https://localhost:9443/ccm/oslc/workitems/96?oslc_cm.properties=com.ibm.team.workitem.linktype.parentworkitem.parent";
`$curl -D - -k -b $COOKIES -u vivek:vivek -H "Content-Type: application/x-oslc-cm-changerequest+json" -X PUT --data-binary \@wi-2.json $URL2`;

Here is what wi-2.json file looks like:
---------------------------------------------
{"rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent":[{"rdf:resource":"https:\/\/localhost:9443\/ccm\/resource\/itemName\/com.ibm.team.workitem.WorkItem\/1"}

1 vote



3 answers

Permanent link
I use the following to link "Resolves & Resolved by"

my $cm_resolves_link = $rtc_task_partial_xml->createElement("rtc_cm:com.ibm.team.workitem.linktype.resolvesworkitem.resolves"); 


Above is Perl code using MSXML and Curl of course to post the XML

You might need to find the exacty nodename for "Parent"

For Resolves it is :
rtc_cm:com.ibm.team.workitem.linktype.resolvesworkitem.resolves


Hope this helps

Karthik

0 votes


Permanent link
Thanks Karthik for the suggestion !

However, I got the parent link working after using OSLC 2.0 coventions.

But I noticed , xml representation does not give me required output while usin json I could get the GET output right.

Is it some bug with xml representation ?



I use the following to link "Resolves & Resolved by"

my $cm_resolves_link = $rtc_task_partial_xml->createElement("rtc_cm:com.ibm.team.workitem.linktype.resolvesworkitem.resolves"); 


Above is Perl code using MSXML and Curl of course to post the XML

You might need to find the exacty nodename for "Parent"

For Resolves it is :
rtc_cm:com.ibm.team.workitem.linktype.resolvesworkitem.resolves


Hope this helps

Karthik

0 votes


Permanent link
Thanks Karthik for the suggestion !

However, I got the parent link working after using OSLC 2.0 coventions.

But I noticed , xml representation does not give me required output while usin json I could get the GET output right.

Is it some bug with xml representation ?



perhaps also personally I felt it was not so easy to get the xml representation. had to do many workarounds to get the representation

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,938

Question asked: Jan 19 '12, 11:25 a.m.

Question was seen: 5,744 times

Last updated: Jan 19 '12, 11:25 a.m.

Confirmation Cancel Confirm