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

How to get project area name via IWorkItem

If I have a reference to an IWorkItem object, how do I get the name of the project area in which the work item is defined?

0 votes



2 answers

Permanent link
This should work -

IProjectAreaHandle projectAreaHandle = workItem.getProjectArea();

IProjectArea projectArea = (IProjectArea) repo.itemManager().fetchCompleteItem(projectAreaHandle, IItemManager.DEFAULT, monitor);

String projectAreaName = projectArea.getName();

0 votes


Permanent link
This should work -

IProjectAreaHandle projectAreaHandle = workItem.getProjectArea();

IProjectArea projectArea = (IProjectArea) repo.itemManager().fetchCompleteItem(projectAreaHandle, IItemManager.DEFAULT, monitor);

String projectAreaName = projectArea.getName();


The above will not work as my code is server-side only, however; it did lead me to the solution which is to retrieve the IRepositoryItemService service object and invoke the IRepositoryItemService.fetchItem(projectAreaHandle, IRepositoryItemServer.COMPLETE) method.

0 votes

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,941

Question asked: Jun 13 '11, 11:15 a.m.

Question was seen: 6,388 times

Last updated: Jun 13 '11, 11:15 a.m.

Confirmation Cancel Confirm