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

RTC 6.0.3 M4 Can't save custom attribute

Java code:
IWorkItemClient wiService = (IWorkItemClient)repository.getClientLibrary(IWorkItemClient.class);
    IAttribute attr = wiService.createNewAttribute(projectArea, identifier, type, IAttribute.FULL_TEXT_KIND_DEFAULT,  null /*IProgressMonitor*/);
    attr.setDisplayName(label);          
    attr = wiService.saveAttribute(attr, null /*IProgressMonitor*/);

Exception :
ERROR java.lang.IllegalArgumentException: Item id and State id must not be null
    at com.ibm.team.repository.service.internal.RepositoryItemService.fetchState(RepositoryItemService.java:944)
    at sun.reflect.GeneratedMethodAccessor2195.invoke(null)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
    at java.lang.reflect.Method.invoke(Method.java:620)
    at .....
......................
at com.ibm.team.workitem.common.internal.WorkItemCommon.saveAuditables(WorkItemCommon.java:1302)
    at com.ibm.team.workitem.common.internal.WorkItemCommon.saveAuditable(WorkItemCommon.java:1292)
    at com.ibm.team.workitem.common.internal.WorkItemCommon.saveAttribute(WorkItemCommon.java:364)

0 votes


Be the first one to answer this question!

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,938
× 35

Question asked: Aug 24 '16, 7:19 a.m.

Question was seen: 2,319 times

Last updated: Aug 24 '16, 7:26 a.m.

Confirmation Cancel Confirm