How to get Project area name in IProjectAreaHandle?
Hi
code : AdvisableOperation operation; // this is run method's parameter. IProjectAreaHandle ipah =operation.getProcessArea().getProjectArea(); i don't know how to use IProjectAreaHandle. How do you use IProjectAreaHandle? Or How do you get Project area name in IProjectAreaHandle? thanks. |
4 answers
If your code is running server side, you can use: HI. thank you for reply. i resolved. IProjectAreaHandle ipah =operation.getProcessArea().getProjectArea(); IProjectArea ipa = (IProjectArea)itemService.fetchItem(ipah, null); String projectName = ipa.getName(); |
Depends on how you got the IProjectAreaHandle you can simple do:
But the it is safer to do as you did it, using IRepositoryItemService.fetchItem() |
If your code is running server side, you can use:
IRepositoryItemService.fetchItem() to get the project area. If your code is running in eclipse client side, you can use IItemManager.fetchCompleteItems() to get the project area. You can use ITeamRepository.itemManager() to get the item manager instance. |
Hi
How to get IRepositoryItemService in run method on serverside.
I have one more question on how we get the Iteration name from the IIterationHandle following is my code
IIterationHandle handle = (IIterationHandle)operation.getDevelopmentLine().getCurrentIteration();
operation is run() parameter.
Thanks
Surender
Comments
Surender Biyyala
commented Mar 10 '14, 1:41 p.m.
I find the following to get the IRepositoryItemService
if your class extends AbstractService then you can get it by using the following code
IRepositoryItemService itemService = getService(IRepositoryItemService.class);
and you get the IIteration by the following code
IIteration iteration = itemService .fetchItem(iterationhandle,null);
iteration.getName();
|
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.