It's all about the answers!

Ask a question

How to set value for a work item attribute of type "Large HTML" using RTC API?


deepti harinkhede (219) | asked Apr 05 '18, 3:24 a.m.

Hi,

I need to set value to an attribute "Acceptance Criteria" which is of type "Large HTML". I have written below snippet:

IWorkItemCommon workItemCommon = getService(IWorkItemCommon.class);

IAttribute accCriteria= workItemCommon.findAttribute(projectArea,"acceptance.criteria.final", null);

XMLString newChildAccCriteria = XMLString.createFromXMLText(wiConfig.accCriteria);

newChildWI.setValue(accCriteria,newChildAccCriteria);

but I am getting error while setting the value (at setValue)

Error:

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.common.internal.model.impl.WorkItemImpl.setValue(WorkItemImpl.java:2909)

Please let me know how to set value for Large HTML type using RTC API.

Thank you

Accepted answer


permanent link
Ralph Schoon (63.2k33646) | answered Apr 05 '18, 3:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
deepti harinkhede selected this answer as the correct answer

Comments
deepti harinkhede commented Apr 05 '18, 6:22 a.m. | edited Apr 06 '18, 6:51 p.m.

Thank you Ralph.

It worked after using WorkingCopy.

Your answer


Register or 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.