It's all about the answers!

Ask a question

How do I ensure that a back link is created when using REST API to create an "Implements Requirement" link from RTC to RRC?


Andrew Trobec (49712139139) | asked Feb 08 '14, 7:08 a.m.
Hello,

I am trying to use the REST API to create an "Implements Requirement" link from a work item in RTC to an artifact in RRC.  I have managed to do this, but it only works one way.  I can see the link in my work item, but there is no back link created from RRC.

Basically what I have done is used a GET method to the "?oslc_cm.properties=oslc_cm:implementsRequirement" property of an existing linked work item, then I re-created the XML and used the PUT method to that same property of a new work item.  I even took care to use the "<Artifact identifier>: <Artifact title>" format for the "<dcterms:title>" field so it looks exactly like an already existing link.

How do I make the back link?  Can I do it with a single PUT to a work item, or do I have to make a second PUT to the RRC artifact as well?

Thank you and best regards,

Andrew

Accepted answer


permanent link
Don Yang (7.3k2194130) | answered Feb 09 '14, 5:36 a.m.
Andrew

If you use REST API to create link, unlike you add link in the GUI manually, the back link wont get created automatically,
this is how API works and you need to make a similar PUT in RRC side as well.

Don
Andrew Trobec selected this answer as the correct answer

Comments
Andrew Trobec commented Feb 10 '14, 9:08 a.m.

@dyang

Thanks Don, I'll look into it.
Regards,
Andrew

Your answer


Register or to post your answer.