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

Problem with adding a custom attribute to a workItem

Maybe someone can help me with this problem.
I just want to add a custom attribute, which doesn't work for some reason.

public void addAttributes(IWorkItem workItem, List<IAttribute> attList) {
try {
IWorkItem wi = copyManager.getWorkingCopy(workItem);

for (IAttribute elem : attList) {
if (!wi.hasCustomAttribute(elem)){
wi.addCustomAttribute(elem); // ASSERTION FAILED EXCEPTION
}
}
} catch (TeamRepositoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}


org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:109)
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:95)
at com.ibm.team.workitem.common.internal.model.impl.WorkItemImpl.addCustomAttribute(WorkItemImpl.java:2796)

Thanks in advance.

0 votes



One answer

Permanent link
Maybe someone can help me with this problem.
I just want to add a custom attribute, which doesn't work for some
reason.

Maybe the custom attribute if of a type that is not supported. We
currently support only primitive types and enumerations.

Or maybe the custom attribute was created in a different project area
than the work item.

HTH,
Patrick
Jazz Work Item Team

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

Question asked: Aug 22 '08, 4:58 p.m.

Question was seen: 5,841 times

Last updated: Aug 22 '08, 4:58 p.m.

Confirmation Cancel Confirm