Getting the value for comments from a ResolvedWorkItem?
My code obtains the value for various attributes from a ResolvedWorkItem, based on their respective attribute ids. The following logic generally works fine:
However, getValue() throws an exception if the attribute id is "internalComments" (the id for the comments field):
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
at com.ibm.team.workitem.client.internal.util.ResolvedWorkItem.getValue(ResolvedWorkItem.java:181)
I've confirmed that the attribute exists within the work item (that is, workItem.findAttribute("internalComments") returns a non-null result, and calling getAttributeType on it returns the value "comments"). What is the right way to get the value for the comments?
Thanks!
Roger
WorkItemUIWorkingCopy uiCopy = (WorkItemUIWorkingCopy) myWorkItemWorkingCopy.getAdapter(IWorkItemUIWorkingCopy.class);
ResolvedWorkItem workItem = uiCopy.getResolvedWorkItem();
Object o = workItem.getValue(someAttributeIdentifier);
However, getValue() throws an exception if the attribute id is "internalComments" (the id for the comments field):
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
at com.ibm.team.workitem.client.internal.util.ResolvedWorkItem.getValue(ResolvedWorkItem.java:181)
I've confirmed that the attribute exists within the work item (that is, workItem.findAttribute("internalComments") returns a non-null result, and calling getAttributeType on it returns the value "comments"). What is the right way to get the value for the comments?
Thanks!
Roger