How can I get the Project Area name for the work item within a ServerSide Participant?
I'm trying to have a single WorkItemSave participant be able to work on multiple project areas on the same server (it is a singleton). The two project areas are slightly different in their attribute IDs and work item type IDs.
My first major check needs to be "which project area is this work item in" so that I can then use the proper literals for the IDs. However, I haven't had alot of luck getting the project area name *easily*. I have this code, but not sure if a) it will work well and b) if there is a better/cheaper way:
IProjectAreaHandle ipah = newWorkItemData.getProjectArea();
IRepositoryItemService itemService = getService(IRepositoryItemService.class);
IProjectArea ipa = (IProjectArea)itemService.fetchItem(ipah, null);
String projectName = ipa.getName();
Any ideas?
Thanks in advance.
My first major check needs to be "which project area is this work item in" so that I can then use the proper literals for the IDs. However, I haven't had alot of luck getting the project area name *easily*. I have this code, but not sure if a) it will work well and b) if there is a better/cheaper way:
IProjectAreaHandle ipah = newWorkItemData.getProjectArea();
IRepositoryItemService itemService = getService(IRepositoryItemService.class);
IProjectArea ipa = (IProjectArea)itemService.fetchItem(ipah, null);
String projectName = ipa.getName();
Any ideas?
Thanks in advance.
Comments
sam detweiler
May 29 '14, 10:03 p.m.1 vote
Susan Hanson
May 30 '14, 8:10 a.m.sam detweiler
May 30 '14, 8:21 a.m.sam detweiler
May 30 '14, 8:27 a.m.sam detweiler
May 30 '14, 8:30 a.m.