It's all about the answers!

Ask a question

How to get Project area name in IProjectAreaHandle?


0
1
JaeSung Yang (21145) | asked Jun 15 '11, 8:52 p.m.
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



permanent link
JaeSung Yang (21145) | answered Jun 16 '11, 2:19 a.m.
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.

thank you for reply.

i resolved.

IProjectAreaHandle ipah =operation.getProcessArea().getProjectArea();
IProjectArea ipa = (IProjectArea)itemService.fetchItem(ipah, null);
String projectName = ipa.getName();

permanent link
Eduardo Bello (4401922) | answered Jun 16 '11, 8:22 a.m.
Depends on how you got the IProjectAreaHandle you can simple do:


IProjectArea projectArea = (IProjectArea) projectAreaHandler.getFullState();


But the it is safer to do as you did it, using IRepositoryItemService.fetchItem()

permanent link
Qiong Feng Huang (76911610) | answered Jun 15 '11, 8:55 p.m.
JAZZ DEVELOPER
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.

permanent link
Surender Biyyala (403548) | answered Mar 10 '14, 9:55 a.m.
 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


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.