It's all about the answers!

Ask a question

Get the role of a contributor


vinay reddy (1711205) | asked Mar 25 '09, 2:36 p.m.
How to get the roles assigned to a user(contributor) given a contributor handle? I had a glance at IContributor and IContributorDetails but could not find any such api.

After some search, I find this in IServerProcess

IRole[] getContributorRoles(IContributorHandle contributor, IProcessArea processArea) throws TeamRepositoryException;

Now, how do I know what IProcessAreas a contributor is associated with? This leads me to the question of api to get IProcessAreas given a IContributorHandle. Help plz.

5 answers



permanent link
Jorge Diaz (8664434) | answered May 26 '11, 4:05 a.m.
JAZZ DEVELOPER
Solved. Sorry for the dummy question, it was mainly a plugins dependencies problem.

In case it helps other people:

- from "AdvisableOperation operation" parameter I can get the Process Area
- from "IProcessServerService" I can an object implementing "IServerProcess " to use "getContributorRoles" method

Regards,

Jorge.

permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Mar 26 '09, 4:18 a.m.
JAZZ DEVELOPER
Hi
On the client, you can use
IProcessItemService#findProcessAreas
and on the server
IProcessService#findProcessAreas


Regards

Marcel
Jazz Work Item team

permanent link
vinay reddy (1711205) | answered Mar 28 '09, 6:17 a.m.
Is this the api what you are referring to?

public IProcessArea findProcessArea(String areaURI, String[] properties) throws TeamRepositoryException;


If so, how to get the areaURI given a contributor?

Alternatively I find ContributorDTO which has some info about user roles. However it seems to be present in an internal package. Any suggestion?

permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Mar 30 '09, 5:28 a.m.
JAZZ DEVELOPER
No, I was referring to:

IProcessArea[] findProcessAreas(IContributor user, IProjectAreaHandle projectAreaHandle, String[] properties) throws TeamRepositoryException;

which takes an IContributor and the project area as argument. The result is an array with ITeamArea elements and mabye the IProjectArea, too (if the contributor is also member of the project area itself).

Regards

Marcel
Jazz Work Item team

permanent link
Jorge Diaz (8664434) | answered May 25 '11, 12:48 p.m.
JAZZ DEVELOPER
No, I was referring to:

IProcessArea[] findProcessAreas(IContributor user, IProjectAreaHandle projectAreaHandle, String[] properties) throws TeamRepositoryException;

which takes an IContributor and the project area as argument. The result is an array with ITeamArea elements and mabye the IProjectArea, too (if the contributor is also member of the project area itself).

Regards

Marcel
Jazz Work Item team


Is it possible to get the same information (role assigned to contributor) from within a Process Advisor execution? From the AdvisableOperation object I can get ProcessArea information (getNewProcessArea) but there I have no information bout roles.

Thanks!

Regards,

Jorge

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.