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

How to create remote change sets(with external link) ?

Hi,

I want to create a remote change set, like below:
After click the change set link, you can see details of change at Github:
Above is how jazzHub track changes to your Github source code.
This change set is a bit different:
1.Seems it doesn't belong to an existing component
2.It can refer to an external link , not only an existing workItem in RTC.

Now I can create change sets using following code:
IChangeSetHandle changeSet = workspace.createChangeSet (component, "comment", true, null);
IFileSystemWorkItemManager itemManager = (IFileSystemWorkItemManager) repo
                    .getClientLibrary(IFileSystemWorkItemManager.class);
List<ILink> link = itemManager.createLink(wsHandle, changeSet, 
                    new IWorkItemHandle[] { (IWorkItemHandle)workItem.getItemHandle()}, null);           

But the change sets I created must belong to an existing component, and it must to an existing workItem.

How to create remote change sets using plain java library or REST API ?

Thanks!

0 votes

Comments

Hi,
I have a few follow up questions for you:

  1. Can you confirm you are using JazzHub?
  2. The screenshot you included above is linking a GitHub commit to a work item in JazzHub.  This link was created automatically by using the GitHub integration with JazzHub.  I think that you are trying to create a remote change set using the plain java library or the REST API, not using the GitHub integration with JazzHub.  Is that right?
  3. Can you explain what you mean by creating a remote change set?  Where is the code stored that you are trying to create?

Thanks for your reply!

1.No, I am using RTC.
2.Yes, I want to create a remote change set using the plain java library or the REST API in RTC.
3.I store code in Gitorious, and use RTC as issue tracker. 
I want to do the same thing like GitHub integration with JazzHub, when I excute "git commit –am "Update the hello script, per bug 1544" to Gitorious, my post-receive hook will add a link to my push to work item 1544.

I'm not familiar with any Gitorious integrations.  I know that to setup the JazzHub integration with GitHub, we had to setup the Git Adapter on our server (https://jazz.net/library/article/854/).  I'm not sure if the Git Adapter would work with Gitorious.  Hopefully, someone else can point you in the right direction.

FYI @ryehle @cjkyroua

Thanks! 


Accepted answer

Permanent link
Remote change set links are created when linking a change set on one server to a work item on another server.

To create the link, use IWorkspaceManager#createLinks(). These are OSLC links and it's how distributed SCM works with work item linking. However, it is marked as experimental so be prepared if it is deprecated.
da zhang selected this answer as the correct answer

0 votes


One other answer

Permanent link
If you are interested in the Plain Java Client Libraries, you can start your endeavor here: http://rsjazz.wordpress.com/2013/10/15/extracting-an-archive-into-jazz-scm-using-the-plain-java-client-libraries/

The post links to several other posts around these topics. But it is only for Jazz SCM.

If you are looking for creating work items, start here: https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation

To get started on these topics, try to search here:https://rsjazz.wordpress.com/ . I have several posts around the API. This is a good starting point if you are new to it: https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/

Please note, the posts are interconnected and you should be able to search the log either with the built in search or using search engines.

0 votes

Comments

Thanks!

I will keep searching and learning. 

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,952
× 1,701
× 383
× 382
× 169

Question asked: Nov 11 '13, 11:54 p.m.

Question was seen: 7,608 times

Last updated: Dec 16 '13, 5:26 p.m.

Confirmation Cancel Confirm