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

Java API: Move Build Definitions to folder

Hello, 

I am trying to move a Build Definition that was just created to a Build Definition folder in through the Java API. To do this I am using moveItemsToFolder. How do I genereate the IBuildFolderHandle? Below is my snippet of code and where I am stuck. Thank you!

IItemHandle defhandle = IComponent.ITEM_TYPE.createItemHandle(com.ibm.team.repository.common.UUID.valueOf(newDefinition_workingcopy.getPropertyValue("team.scm.workspaceUUID", "FAILED")), null);
IBuildFolderHandle buildfolder = newDefinition_workingcopy.getParent();
System.out.println(buildfolder);
buildClient.moveItemsToFolder(defhandle, "IBuildFolderHandle", myMonitor);
System.out.println();

0 votes



One answer

Permanent link
looks like you would have to search for the folder to get the handle..
here is how to do the query for buildengines.. (accepted answer)

https://jazz.net/forum/questions/164937/how-to-get-all-the-build-definitions-under-a-project-area

IBuildFolder and IBuildFolderHandle are in the 5.0 javadoc.

0 votes

Comments

I see what you mean, I have never used the query funtionality. I will try that. Thanks! 

Hi Sam, 


I am mostly there, however I cannot figure out what "iprja" in your example. 

Can you tell me what object that is? Thank you again for the help. I am a total newbie to this API starting last week.  

sorry shorthand for IProjectArea iprja;

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

Question asked: Oct 13 '14, 2:14 p.m.

Question was seen: 3,695 times

Last updated: Oct 14 '14, 2:07 p.m.

Confirmation Cancel Confirm