It's all about the answers!

Ask a question

RTC API - Related Change Requests - ServerSide


Zaid Al-Khishman (35815) | asked Dec 22 '14, 7:16 p.m.
edited Dec 23 '14, 4:29 p.m.
Hi Guys,

So I've set up an RTC server to be able to communicate with a ClearQuest Web Client. I'm able to use RTC's web GUI to create Related Change Requests linking to that server. RTC, given a ClearQuest user with sufficient modify privileges, is able to automatically link the ClearQuest Item back to RTC (So we end up with a 2-way linkage).

Now what I'd like to do is I'd like to be able to this programmatically using RTC's API. The furthest that I've gone so far is creating Related Artifacts and adding external links to them.

In pseudo code. This is what it would ideally look like:

Create Link Object of Type Related_Change_Request
Object.setDataBase (<nameOfDatabaseAtClearQuest>)
Object.setLinkToExistingItem(true)
Object.setTargetIdAtClearQuestDatabase(TargetIdAtClearQuestDatabase)
targetReferences.add(ObjectEndpoint, Object);
Set additionalParams = new HashSet();
additionalParams.add(IAdditionalSaveParameters.UPDATE_BACKLINKS);
// Save the trigger work item with the links we created
IStatus saveStatus = fWorkItemServer.saveWorkItem3(currentItem,
currentReferences, null, additionalParams);
As you can see the pseudo code is only listing the steps required (from my understanding) to manually create a Related Change Request through RTC's web GUI

Edit: I need to be able to do this programmatically but I don't know where to find documentation on the API that does this. How should I go about doing this?
(create Related change requests on a serverside plugin)

This is done in an Operation Participant during a Deliver Operation.
 
Thanks,

RTC : 4.0.7

References: http://rsjazz.wordpress.com/2013/11/06/creating-clm-links-with-back-link/
https://jazz.net/forum/questions/157350/adding-a-related-change-request-between-work-items-using-the-rtc-java-api


Comments
Ralph Schoon commented Dec 23 '14, 4:06 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

What is your question? I don't quite understand.


Zaid Al-Khishman commented Dec 23 '14, 4:31 p.m. | edited Dec 23 '14, 4:31 p.m.

Hi Ralph, I need to essentially translate the pseudo code to real code and I don't know where to start. How would I create Related change requests on a serverside plugin?

One answer



permanent link
Ralph Schoon (58.7k23642) | answered Dec 23 '14, 5:50 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Dec 23 '14, 5:50 p.m.
Zaid,

the question is first, what kind of server extension. And then, how to proceed.

I tried to help as good as I am able to on my blog. Start here: http://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/

Please read it carefully and follow the enclosed links. It should enable you to start doing what you want. It is not trivial though, so don't try to rush it. Really, familiarize yourself with the material available and then start doing your work.

http://rsjazz.wordpress.com/2013/03/14/what-apis-are-available-for-rtc-and-what-can-you-extend/

The code you refer to can be used in any server side plugin. Most common are follow up actions as described in the material and the workshop liked within https://jazz.net/library/article/1000

Comments
Zaid Al-Khishman commented Dec 23 '14, 6:13 p.m. | edited Dec 23 '14, 6:15 p.m.

Hi Ralph,

I've already gone through most of your things on http://rsjazz.wordpress.com. However I'm unable to achieve my target (for the plugin at hand: automating related change requests creation programmatically) with that alone.

Your blog has helped me tremendously in getting myself started with RTC server extension development. Consequently I've managed to write (, debug and test) several other extensions so I know my way around (slightly) RTC's object model.

This question https://jazz.net/forum/questions/157350/adding-a-related-change-request-between-work-items-using-the-rtc-java-api seems to be the most relevant to what I need but it's not exactly what I'm looking for.

This article https://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/ also seems to be the most relevant to what I need but it's also not exactly what I'm looking for.

Thanks


Ralph Schoon commented Jan 05 '15, 3:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Unfortunately, the question is too unspecific so, unless I write an extension, I can't answer it.


sam detweiler commented Jan 05 '15, 8:33 a.m.

I believe that the Clearquest server is a 'friend' of the RTC server and vice versa. this typically means that one server has permission to call the OSLC rest api of the other.

the OSLC discovery protocol (starting with the rootservices document) allows one to determine the proper url to call the creation service for the data type on the other server.  and to get the URL back of the created object. (needed for the link)

I do not know how to navigate the friends list to find the url to the foreign server rootservices doc. but the data is in the root services doc.

https://server:port/application/rootservices
where application is jts, ccm, ...


Your answer


Register or to post your answer.