It's all about the answers!

Ask a question

Is it posiible to change owner of workspace programmactically using JAVA API?


Jayashri shrinivas (13112) | asked Sep 10 '20, 2:44 a.m.
Hi team,

I have IWorkspaceConnection, i need to change the owner of this workspace to another user id and password programmactically . Is it possible to change the wospace owner. If so which Java api i need to use?.

Thanks in advance

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Sep 10 '20, 4:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I'd try com.ibm.team.scm.client.IWorkspaceConnection.setOwnerAndVisibility(IAuditableHandle, IReadScope, IProgressMonitor)

Jayashri shrinivas selected this answer as the correct answer

Comments
Ralph Schoon commented Sep 10 '20, 5:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note that the password of the user has nothing to do with anything here and there is no Jazz API that could change it.


Jayashri shrinivas commented Sep 10 '20, 5:56 a.m.

So how can I change the user with help of IAuditableHandle beacuse I only have userID


Ralph Schoon commented Sep 10 '20, 7:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Try

IContributor searchUser = (IContributor) teamRepository.contributorManager().fetchContributorByUserId(userToSearch,monitor);

Consider studying https://rsjazz.wordpress.com/

Your answer


Register or 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.