RTC - associate category with Team Area using Plain Java APIs
Trying to associate category with team area using Plain JAVA APIs but it fails with the below error.
2 methods used but both fail with different errors.
Code snippet and the error added. Any hints will be of great help :)
2 methods used but both fail with different errors.
Code snippet and the error added. Any hints will be of great help :)
1. Call used: ICategoryObject.getTeamAreas().add(ITeamAreaHandle);
Error : com.ibm.team.repository.common.internal.ImmutablePropertyException
Tried with Category Object too. Same error caused.
2. ICategoryObject.getAsscociatedTeamAreas().add(ITeamAreaHandle);
Error: unmodifiable collection exception for getAsscociatedTeamAreas
Comments
K M
Aug 18 '15, 11:42 a.m.ICategory category = service.createCategory(project,categoryName,MONITOR);
ITeamArea team
category.getAssociatedTeamAreas().add(team);
works for me on a new category, are you trying on an existing category or a new one ?
K M
Aug 19 '15, 11:08 a.m.Sorry I was mistaken I had to do this to make it work
ICategory category = service.createCategory(project,categoryName,MONITOR);
ITeamArea team
((Category) category).getTeamAreas().add(team);
((Category) category).setDefaultTeamArea(team);
1 vote
Radha Nagaraja
Aug 19 '15, 11:14 a.m.Thanks K M. We have already tried the 1st option but no success.
((Category) category).getTeamAreas().add(team);
neither for new category created or for an existing category.
Shall try out the 2nd option. Thank you.
regards,
Radha