It's all about the answers!

Ask a question

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


Jayashri shrinivas (133) | 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 (58.2k23642) | 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.