Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

1

0 votes



4 answers

Permanent link
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();

1 vote


Permanent link
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()

1 vote


Permanent link
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.

0 votes


Permanent link
 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

0 votes

Comments

 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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,936

Question asked: Jun 15 '11, 8:52 p.m.

Question was seen: 11,084 times

Last updated: Mar 10 '14, 1:41 p.m.

Confirmation Cancel Confirm