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

Where can I find a list of IWorkItem attributes

Where can I find a list of IWorkItem attributes that I can fetch using getValue() ?

Thanks!

-Steve

0 votes


Accepted answer

Permanent link
Use IItemManager.fetchCompleteItem to fetch the item for any handle. The items carry the actual info; the handles are essentially just like pointers / URLs.

For example:

IContributorHandle contributorHandle = ...
IContributor contributor = (IContributor) teamRepository.itemManager.fetchCompleteItem(contributorHandle, IItemManager.DEFAULT, null); // should really provide a progress monitor in last arg for progress / cancelaton
String name = contributor.getName();


That's for client-side. For server-side, use IRepositoryItemService to fetch the item.
Ralph Schoon selected this answer as the correct answer

1 vote


4 other answers

Permanent link
Where can I find a list of IWorkItem attributes that I can fetch using getValue() ?

Thanks!

-Steve


Steve,

there are built in operations for a few:


IWorkItem workItem= workingCopy.getWorkItem();
workItem.setHTMLSummary(XMLString.createFromPlainText(fSummary));
workItem.setCategory(fCategory);



Others you can lookup with the name or ID:


IAttribute customString = workItemClient.findAttribute(fProjectArea,
"com.ibm.rtc.ext.custom.test", null);

if(null!=customString && workItem.hasCustomAttribute(customString)){
workItem.setValue(customString, new String("Test"));
}


You can also get a list of attributes, but I seem to be unable to find it right now....

0 votes


Permanent link
Hi,

at least there is a getCustomAttributes() operation.

0 votes


Permanent link
Thanks for the reply! Maybe I should come out and tell you what I really want... I've queried for the work items associated with a build label and now i want to find the resolver of each of those work items. I know there is a getResolver() method that returns an IContributorHandle, but I'm not sure how to get what I need out of that object.

Thanks!

-Steve

0 votes


Permanent link
Perfect! Thank you!

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

Question asked: Jun 16 '11, 10:16 a.m.

Question was seen: 6,764 times

Last updated: Jun 16 '11, 10:16 a.m.

Confirmation Cancel Confirm