Where can I find a list of IWorkItem attributes
Accepted answer
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:
That's for client-side. For server-side, use IRepositoryItemService to fetch the item.
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.
4 other answers
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....
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
Thanks!
-Steve