It's all about the answers!

Ask a question

RTC 6.0.3 M4 Can't save custom attribute


su jianrong (635) | asked Aug 24 '16, 7:19 a.m.
edited Aug 24 '16, 7:26 a.m.
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)

Be the first one to answer this question!


Register or to post your answer.