Get the role of a contributor
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
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. |
Hi
On the client, you can use IProcessItemService#findProcessAreas and on the server IProcessService#findProcessAreas Regards Marcel Jazz Work Item team |
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? |
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 |
No, I was referring to: 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
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.