It's all about the answers!

Ask a question

Copy/Move Build Definition to folder


Bradley Mosher (133) | asked Oct 10 '14, 10:31 a.m.
edited Oct 10 '14, 11:00 a.m. by Ralph Schoon (59.0k23642)
 Hello, 

I am attempting to copy a Build Definition outside of the root Build definition into a sub folder and I cannot find any hint of how to do this within the api documentation. I can successfully do anything I want to do within the root Build Definition folder. Can someone point me in the right direction as to where to find the documentation on how to do this? 

Accepted answer


permanent link
Arne Bister (2.6k12732) | answered May 12 '15, 6:21 a.m.
JAZZ DEVELOPER
Bradley,

please cp. my forum question with answer on how to search for IBuildFolder.
First, create your build definition. Then get a IBuildFolderHandle on the folder to which you want to move.
Put the BuildDefinition Handle in an array:
IItemHandle[] itemHandles = new IItemHandle[] {myBuildDefHandle};
ClientFactory.getTeamBuildClient(repo).moveItemsToFolder(itemHandles, folderHandle, progressMonitor);

Apparently the call gets a working copy of the folder and saves it, too.

If this answers your question please mark it accepted.

- Arne
Ralph Schoon selected this answer as the correct answer

3 other answers



permanent link
sam detweiler (12.4k6182201) | answered Oct 10 '14, 11:18 a.m.
Folders for Build definitions was released with version 5.0
https://jazz.net/downloads/rational-team-concert/releases/5.0?p=news#BuildDefFolderWebUI

in eclipse, right click on builds and select New Folder


permanent link
Bradley Mosher (133) | answered Oct 10 '14, 11:36 a.m.
 Sorry I should have been more clear. I am attempting to do this through the api and have no idea where to go in the api documentation. 

Comments
sam detweiler commented Oct 10 '14, 11:55 a.m.

I don't believe this is documented


permanent link
Bradley Mosher (133) | answered Oct 13 '14, 10:26 a.m.
 I agree I cannot find anything relating to the Build Definition folder structure. I'm thinking it has to be some sort of property of the Build Definitions since I can copy Build Definitions that are in folders without actually specifying the folder. If anyone from jazz can tell me what property this might be it would be greatly appreciated. 

Comments
Arne Bister commented May 11 '15, 10:33 a.m.
JAZZ DEVELOPER

Currently trying to work this out as well. What I found is IBuildFolder and IBuildFolderEntry but I think it is not necessarily a property of build definition. Rather, an IBuildFolderEntry of an IBuildFolder can be either a handle on folder or a build definition.

Once a new IBuildFolderEntry is added, apparently one can save the folder with
ClientFactory.getTeamBuildClient(repo).save(buildFolder, progressMonitor);

I will post a reference to my post once a resolution is found.

Your answer


Register or to post your answer.