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

Copy/Move Build Definition to folder

 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? 

0 votes


Accepted answer

Permanent link
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

0 votes


3 other answers

Permanent link
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

0 votes


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

0 votes

Comments

I don't believe this is documented


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

0 votes

Comments

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 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
× 10,954

Question asked: Oct 10 '14, 10:31 a.m.

Question was seen: 4,405 times

Last updated: May 12 '15, 6:21 a.m.

Confirmation Cancel Confirm