Welcome to the Jazz Community Forum
How to set the components owner Programatically using client libraries?

Hello team
I am creating the RTC components programmatically ,and now i want to change the components owner name
I am using the below code , But how i can pass the team area name in the below code :
In my case team area i have as a string
workspaceManager.setComponentOwnerAndVisibility(IComponentHandle ch, IAuditableHandle ah, IReadScope pscope, monitor);
One answer

<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 14.0px 'Helvetica Neue'; color: #000000; -webkit-text-stroke: #333333} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #000000; -webkit-text-stroke: #333333} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 14.0px 'Helvetica Neue'; color: #000000; -webkit-text-stroke: #333333; min-height: 16.0px} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #000000; -webkit-text-stroke: #333333; min-height: 16.0px} span.s1 {font-kerning: none}
</style>
If you have the project area and team area name you could do the following: IProcessItemService itemService = (IProcessItemService)repo.getClientLibrary(IProcessItemService.class); ITeamArea teamArea = (ITeamArea) itemService.findProcessArea(new URI(NAME_OF_PROJECTAREA + “/“ + NAME_OF_TEAMAREA), IProcessClientService.ALL_PROPERTIES, null);
If you have the team area item id you could do the following: ITeamArea.ITEM_TYPE.createItemHandle(repository, UUID_OF_TEAMAREA, null); If none of the above, then you need to retrieve all the project area’s and match the team area name in the project area: List<IProjectArea> projectAreas = itemService.findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, null); List<ITeamArea> teamAreas = repo.itemManager().fetchPartialItems(projectArea.getTeamAreas(), IItemManager.DEFAULT, Collections.singletonList(ITeamArea.NAME_PROPERTY_ID), null);