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

Sub components not unloaded / removed from RWS when replacing components which have sub components - scm

Flle structure

Stream 1:
Comp 1
|---Comp 2 - File 2
|------Comp 3

Stream 2:
Comp 1
|---Comp 2 - File3

When I replace Comp2 from Stream 2 to Stream 1, why is the Comp 3 in Stream 1  not removed/unloaded?

0 votes



One answer

Permanent link

A replace operation will not cause a component to be removed from the workspace. If the replacing version of the parent component does not include a subcomponent that was under the original version of the parent component, and the subcomponent is not already in the workspace under another parent component, then the subcomponent will become a top-level component.

Imagine that you have top-level components A and B. You later decide to make B a subcomponent of A. Then you change your mind, so you replace A with the initial baseline of A. If B were removed with that replace operation, it would clearly be incorrect.

Since there are cases where the user would want the subcomponent to be removed, and other cases where he would not, RTC does the conservative thing and leaves the component in the workspace. The user can then remove that component, if desired.

0 votes

Comments

I personally believe that the component should by default be automatically be removed from a workspace/stream if it is a sub-component that has been removed from its only parent component in the workspace/stream.   My rationale is that the primary purpose of making a component a subcomponent of another component is to declare that this sub-component is required by its parent component, and if it is no longer needed by any parent component, then it should no longer be in the workspace/stream.
I have created a new enhancement request https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/447317 : "Provide warning if an orphaned component is being added to the top level component list of a workspace/stream"

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,202

Question asked: Nov 17 '17, 7:27 a.m.

Question was seen: 2,271 times

Last updated: Nov 21 '17, 2:49 a.m.

Confirmation Cancel Confirm