It's all about the answers!

Ask a question

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


Venkatesh R (1518) | asked Nov 17 '17, 7:27 a.m.

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?

One answer



permanent link
Steven Holtsberg (29665) | answered Nov 20 '17, 3:27 p.m.

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.


Comments
Geoffrey Clemm commented Nov 21 '17, 2:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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 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.