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)