How to gel all the project area list within an Advisor
Hi,
I am trying to develop a operation advisor that will check workitem status in a different project area. The problem is I need to search that project area every time my advisor works. I already found IProjectArea.findProcessArea method but it works in client side so I can not use it in an advisor.
Thank you.
I am trying to develop a operation advisor that will check workitem status in a different project area. The problem is I need to search that project area every time my advisor works. I already found IProjectArea.findProcessArea method but it works in client side so I can not use it in an advisor.
Thank you.
Accepted answer
I used https://www.google.com/search?q=RTC+API+find+Project+Area+server+site:jazz.net and there where some promising hits.
I'd try https://jazz.net/forum/questions/97543/server-api-to-get-the-project-area and https://jazz.net/forum/questions/78308/how-to-pass-uri-parameter-to-iprocessserverservicefindprocessarea-method and see f that is server API. You can definitely
com.ibm.team.process.service.IProcessServerService.class seems to do the trick. Note, it implements com.ibm.team.process.internal.common.service.IProcessService which has most of the API you want.
I'd try https://jazz.net/forum/questions/97543/server-api-to-get-the-project-area and https://jazz.net/forum/questions/78308/how-to-pass-uri-parameter-to-iprocessserverservicefindprocessarea-method and see f that is server API. You can definitely
com.ibm.team.process.service.IProcessServerService.class seems to do the trick. Note, it implements com.ibm.team.process.internal.common.service.IProcessService which has most of the API you want.
Comments
As I understand, I need to have full project name but I have only first 6 character which is a unique id for project name.
I solved it.
IProcessServerService processService = getService(IProcessServerService.class);
IContributorHandle user = this.getAuthenticatedContributor();
IRepositoryItemService itemService = getService(IRepositoryItemService.class);
IContributor loggeduser = (IContributor) itemService.fetchItem(user, null);
IProcessArea[] userProjects= processService.findProcessAreas(loggeduser, null, null);