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

Can I use RTC CLI to associate a change set to a workitem in another repository?

Using RTC client, I'm able to associate a change set to a different repository using "Associate Change Request". Can I do the similar thing using command line? I read the help but it seems it only talks about the workitem in the same repository.

Could anyone give a hint? Thanks!

0 votes



6 answers

Permanent link
Yes, depending on which version of the scm cli client it should be either 'scm changeset associate <changeset uuid/alias> <workitem>@<repoNickname_or_repoUrl>' or 'scm add workitem <changeset uuid/alias> <workitem>@<repoNickname_or_repoUrl>'
I believe you should login into the repository using the scm cli prior to issuing that command.

0 votes


Permanent link
Thanks Shashikant for your help. But I encountered another issue when using this syntax.

For example, I have 2 repositories, repA is the SCM repository and repB stores the workitems. I was using 'scm add workitem <changesetUUID>@repA <workitemID>@repB', my RTC client is 4.0.6. Then there reports the following error:

'Problem running 'add workitem':
Service failed to communicate with repository repA: CRJAZ0105E The request for the following URL was denied: /ccm/service/com.ibm.team.scm.common.IScmService.  The status is "Unauthorized".'

I have logged into both repositories before the add workitem command. I also have tried to support login info in the add workitem command (-u <userid> -P <password>), but it didn't work either. Anything I missed here? Thank you!

0 votes

Comments

It is taking the repository name as 'repA' which seems incorrect. When you logged in using the cli did you specify a nick name?

For ex: scm login -r https://your_repo_url -u user_name -P password -n nick_name
If so, can you run 'scm list credentials' and see if the nickname is listed against the repo url.


Permanent link
Oh, 'repA' and 'repB' was confusing.. To make things clear, I just used 'repA' and 'repB' here to represent the repo url so it's shorter. In my real case, I used the full repo url after @, but it didn't work and reported error

0 votes

Comments

I am assuming you are able to run other commands which execute successfully. Could you try to list the change sets of the workitem. The command to run is : scm list changesets -W workitemId -r repoUrl_or_nickName.


Permanent link
There is no error/exception if I execute 'scm list changesets', but it always reports 'No change sets found for the specified workitems' (As I suggested early, the workitems and the changesets are in different repositories, I'm not sure if this result is as expected?)

I also found that when executing 'scm add workitem', it occasionally throws exceptions like:
java.lang.NullPointerException
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.getBundle(RegistryStrategyOSGI.java:150)
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:166)
        at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
        at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
        at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
        at com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry$Descriptor$1.run(ClientLibraryFactoryRegistry.java:140)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry$Descriptor.getFactory(ClientLibraryFactoryRegistry.java:132)
        at com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry.getClientLibrary(ClientLibraryFactoryRegistry.java:89)
        at com.ibm.team.repository.client.internal.TeamRepository.getClientLibrary(TeamRepository.java:527)
        at com.ibm.team.calm.foundation.client.preview.ResourceReferenceResolver.getPreviewManager(ResourceReferenceResolver.java:199)
        at com.ibm.team.calm.foundation.client.preview.ResourceReferenceResolver.resolveWithResourcePreview(ResourceReferenceResolver.java:271)
        at com.ibm.team.calm.foundation.client.preview.ResourceReferenceResolver.resolveWithRepositoryItems(ResourceReferenceResolver.java:258)
        at com.ibm.team.calm.foundation.client.preview.ResourceReferenceResolver.resolve(ResourceReferenceResolver.java:162)
        at com.ibm.team.filesystem.client.internal.calm.OslcLinkUtil.fetchDetails(OslcLinkUtil.java:358)
        at com.ibm.team.filesystem.rcp.core.internal.oslc.OslcLinkWrapper.fetchDetails(OslcLinkWrapper.java:299)
        at com.ibm.team.filesystem.rcp.core.internal.changes.util.listeners.UpdateChangesJob.run(UpdateChangesJob.java:482)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
java.lang.NullPointerException
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.getBundle(RegistryStrategyOSGI.java:150)
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:166)
        at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
        at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
        at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
        at com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry$Descriptor$1.run(ClientLibraryFactoryRegistry.java:140)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry$Descriptor.getFactory(ClientLibraryFactoryRegistry.java:132)
        at com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry.getClientLibrary(ClientLibraryFactoryRegistry.java:89)
        at com.ibm.team.repository.client.internal.TeamRepository.getClientLibrary(TeamRepository.java:527)
        at com.ibm.team.calm.foundation.client.preview.ResourceReferenceResolver.getPreviewManager(ResourceReferenceResolver.java:199)
        at com.ibm.team.calm.foundation.client.preview.ResourceReferenceResolver.resolveWithResourcePreview(ResourceReferenceResolver.java:271)
        at com.ibm.team.calm.foundation.client.preview.ResourceReferenceResolver.resolveWithRepositoryItems(ResourceReferenceResolver.java:258)
        at com.ibm.team.calm.foundation.client.preview.ResourceReferenceResolver.resolve(ResourceReferenceResolver.java:162)
        at com.ibm.team.filesystem.client.internal.calm.OslcLinkUtil.fetchDetails(OslcLinkUtil.java:358)
        at com.ibm.team.filesystem.rcp.core.internal.oslc.OslcLinkWrapper.fetchDetails(OslcLinkWrapper.java:299)
        at com.ibm.team.filesystem.rcp.core.internal.changes.util.listeners.UpdateChangesJob.run(UpdateChangesJob.java:482)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Problem running 'add workitem':
Service failed to communicate with repository https://xxxxxx:9443/ccm/: CRJAZ0105E The request for the following URL was denied: /ccm/service/com.ibm.team.scm.common.IScmService.  The status is "Unauthorized".

0 votes


Permanent link
Please raise a defect and these details to it. Thanks.

0 votes


Permanent link
Created defect https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/355689

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
× 1,204

Question asked: Apr 21 '15, 3:16 a.m.

Question was seen: 5,035 times

Last updated: May 03 '15, 11:53 p.m.

Confirmation Cancel Confirm