It's all about the answers!

Ask a question

How can I add a file from one component to another


Lewis Tsao (2174963) | asked Jul 08 '15, 10:53 a.m.
Hi I have a situation where I want to add a file that is already in one component to another component.
For example, currently I have
component 1
comp file 1
reallyusefulfile
component 2
comp file 2

I want to add "reallyfulfile" (same object, preserving history) to component 2 as well so we have.
component 1
comp file 1
reallyusefulfile
conmponent 2
comp file 2
reallyusefulefile
Is that possible at all?

2 answers



permanent link
DJ Houghton (2663) | answered Jul 08 '15, 11:28 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
No, unfortunately you can't copy the object and have the object history at both locations. You can only move objects and retain history.

Comments
Lewis Tsao commented Jul 08 '15, 12:20 p.m.

OK, I suppose I have 2 supplementary questions:

1. How do I do the "move"?

2. If I have a Main Dev stream and Bug Fix stream (obviously with same components). I have created a "reallyusefulfile" in component A in Dev stream, how do I add the file to component A in Bug fix stream?


DJ Houghton commented Jul 08 '15, 1:46 p.m. | edited Jul 08 '15, 2:14 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

1). My apologies - I looked into it further and you can move Eclipse projects across components and retain history (right-click on the project in the Package Explorer and choose Team -> Move in Repository Workspace...) but you cannot move individual files.

There is an open request for this functionality here:
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=21637

There is a related question here which describes the workaround as listed in the work item. Basically you need to create a dummy project, move the project, and then move your file:
https://jazz.net/forum/questions/125188/why-does-moving-files-between-components-not-maintain-history

2). In our development if a fix applies to both the main and maintenance streams, then we accept the changeset into both streams. Typically this is done by clicking on the attached changeset in a work item and "accepting" that changeset, or by changing the flow target in your workspace to the other stream and then delivering the change via the Pending Changes view.


permanent link
Geoffrey Clemm (30.1k33035) | answered Jul 08 '15, 2:11 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In order to make the same file appear in 2 different components, you would "move" the file from the one component to the other.   This will create 2 change sets ... one in the source component (deleting the file) and the other in the target component (creating the file).   If you want to have the file appear in both components, you would discard the change set that deleted the file in the source component.

But be fore-warned ... a change set lives in exactly one component, and cannot be moved to another component.   Starting in 6.0, you are given the option of creating a "clone" of a change set in another component, which effectively lets you apply that change from the pre-move component to the post-move component, but I personally recommend that only an expert user should attempt this magic (:-).

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.