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

Multiple components named identically but only one is visible

Hi,

We have an issue in RTC 4.0.3 with two components named identically, but only one is visible in the RTC client.  Attempting to deliver to the stream using the Plain Java API fails. We retrieve the IComponentHandle using the following code, but the size of cmpnt for this particular component is two, and the debug shows there are two cmpnt elements with the same name.

List<IComponentHandle> cmpnt = SCMPlatform.getWorkspaceManager(repo).findComponents(csc, Integer.MAX_VALUE, monitor);
csc = IComponentSearchCriteria.FACTORY.newInstance();
csc.setExactName(component);
cmpnt = SCMPlatform.getWorkspaceManager(repo).findComponents(csc, Integer.MAX_VALUE, monitor);

We are not sure why there are two components named identically, it was not intentional. How can we resolve this condition? Delete one of the two components using the List "remove" method? If so, which one, element [0] or [1]? And if we do that, we are only modifying the List, I am sure we would somehow need to re-write to IWorkspaceManager the IComponentHandle from the modified List. The stream containing the component(s) is not in use currently. Would deleting and re-creating the stream resolve this condition? I'd like to know if there are any side-effects to any of the above possibilities before trying. Thanks!

Peter
 

0 votes



One answer

Permanent link
As a version control system, components cannot be deleted. However, you can rename the component so that users won't be confused in the future.

If you want to enforce unique component names so that components aren't accidentally created with the same name, this has been answered in the forums before: https://jazz.net/forum/questions/32993/unique-component-names

I would also add both of those components to a workspace and inspect the recent baselines. You'll want to be sure that nobody delivered changes to the wrong component.

2 votes

Comments

We discovered that someone in a different project area had created a component named identically to ours and had set it's visibility as public. We changed visibility scope on the component to their project area and it resolved the collision with our component. Thanks for your reply Tim!

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
× 15

Question asked: Nov 17 '13, 9:57 p.m.

Question was seen: 6,677 times

Last updated: Nov 19 '13, 3:47 p.m.

Confirmation Cancel Confirm