create releases in project using RTC Plain Client java apis
Hello I am trying to create releases in ccm project area and I could create Timelines and iterations as well.
I am using following snippet to create release:
public void createRelease(IProjectArea projectAreaCopy, IIterationHandle newIteration, ITeamRepository teamRepository) throws TeamRepositoryException {
IProcessItemService processItemService = (IProcessItemService) teamRepository
.getClientLibrary(IProcessItemService.class);
IWorkItemClient service = (IWorkItemClient) repository.getClientLibrary(IWorkItemClient.class);
IDeliverable release = service.createDeliverable(projectAreaCopy, "RT_Release_test4", null);
release.setArchived(false);
release.setName("RT_Release_test4");
release.setFiltered(false);
release.setArtifact(newIteration);
release.setIteration(newIteration);
processItemService.save(new IProcessItem[]{projectAreaCopy}, null);
}
projectAreaCopy is working copy of IProjectArea.
The code does not throw any exceptions but does not even create release in project.
My requirement is to create release and assign it to an iteration through RTC Plain client Java Api.
IDE tool - IntelliJ Idea 2018
Please guide me through this.
Regards,
Arati