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!
|
6 answers
Shashikant Padur (4.2k●2●7)
| answered Apr 21 '15, 4:14 a.m.
JAZZ DEVELOPER edited Apr 21 '15, 4:17 a.m.
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.
|
Chong Yuan Yin (76●1●2)
| answered Apr 28 '15, 11:26 p.m.
JAZZ DEVELOPER edited Apr 28 '15, 11:38 p.m.
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! 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.
|
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". |
Please raise a defect and these details to it. Thanks.
|
Created defect https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/355689
|
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.