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

[RTC] Creation of RTC Release Programmatically

 Hi,


Is there a possibility to create a release and assign the iteration to the release via Java API ?
If not, what could be other possibility to achieve this solution

Regards,
Chandan

0 votes


Accepted answer

Permanent link

A release in the context of RTC is an  com.ibm.team.workitem.common.model.IDeliverable and can be created using com.ibm.team.workitem.common.IWorkItemCommon.createDeliverable(IProjectAreaHandle, String, IProgressMonitor). The interface IDeliverable has, amongst others, a method to set an iteration.

Ralph Schoon selected this answer as the correct answer

0 votes

Comments

Thanks Ralph. I am posting my code in new comment.


One other answer

Permanent link

IDeliverable release = (IDeliverable) IDeliverable.ITEM_TYPE.createItem();
        release.setArchived(false);
        release.setName(releaseName);
        release.setFiltered(false);
        release.setArtifact(newIteration.getItemHandle());

        release.setIteration((IIterationHandle) newIteration.getItemHandle());

fWorkItemCommon = (IWorkItemCommon) fTeamRepository.getClientLibrary(IWorkItemCommon.class);
fWorkItemClient.saveDeliverable(release, null);

This code is getting failed.

0 votes

Comments

Several issues:  

  1. "This code is getting failed." is not an error description that makes me willing to spend another second on the code. It is totally unprofessional. I am not free services and can decide where I help on the forum. I am not going to rebuild your code to see the error message.
  2. That If answers are given the answers are not thoroughly read is discouraging to answer questions. I shared the method to create a deliverable already and it is not the one you use.
  3. I am pretty sure I have mentioned this to you already: set up a development workspace with the SDK following the RTC Extensions Workshop and use the find and navigation capabilities of Eclipse to search the SDK for the usage of the API. That way you can figure out how the API works as soon as you have an idea which class you need to deal with e.g. IDeliverable. This is how I find the answers and is the best way I know to approach the Java APIs.

Sorry for my behaviour for not providing error logs. I will try to analyse bit more.

Try using the proposed method to create the deliverable.

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

Question asked: Feb 10 '22, 2:44 p.m.

Question was seen: 1,234 times

Last updated: Feb 11 '22, 3:18 a.m.

Confirmation Cancel Confirm