WorkItemClient findAttribute returns null for Acceptance field
Hello,
I am trying to fetch the "Acceptance Criteria" attribute of the story work item, using the plain java RTC api through the following code.
IAttribute attribute=workItemClient.findAttribute(workItem.getProjectArea(), "com.ibm.team.apt.attribute.acceptance", monitor);
The above code works fine with jazz.net sandbox(version 5.0.2) and returns the IAttribute instance of the relevant work item.
But it returns null when tested with RTC version 4.0.6 repository. Kindly let me know what could be the issue with 4.0.6 repository?
Note: I have changed the java RTC api version accordingly.
Expecting your valuable reply.
thanks
Ambarish
I am trying to fetch the "Acceptance Criteria" attribute of the story work item, using the plain java RTC api through the following code.
IAttribute attribute=workItemClient.findAttribute(workItem.getProjectArea(), "com.ibm.team.apt.attribute.acceptance", monitor);
The above code works fine with jazz.net sandbox(version 5.0.2) and returns the IAttribute instance of the relevant work item.
But it returns null when tested with RTC version 4.0.6 repository. Kindly let me know what could be the issue with 4.0.6 repository?
Note: I have changed the java RTC api version accordingly.
Expecting your valuable reply.
thanks
Ambarish
2 answers
I don't know the answer, but it might help to list out all the attributes found for that workitem type.
note this field is ONLY for story type workitems.
I use this on my sample code here
if (workItem.hasAttribute(ia) && !ia.isInternal())
note this field is ONLY for story type workitems.
I use this on my sample code here
if (workItem.hasAttribute(ia) && !ia.isInternal())
Comments
1 vote
showing 5 of 21
show 16 more comments
I see the long name for my 4.0.6 installation
if you only see the shortname, that is clearly why the request for the longname will return null. (cause the longname is not found)
if you only see the shortname, that is clearly why the request for the longname will return null. (cause the longname is not found)
Comments
showing 5 of 12
show 7 more comments