How to get Contributor Value
![]() I have one custom attribute, the type is contributor type. The problem is I can't get the value of the attribute. I have followed the code that has been provided in "https://jazz.net/forum/questions/202216/how-to-obtain-the-value-of-a-custom-contributor-field-via-a-rtc-participant-plugin" but it always capture null value even though there is a contributor assigned in that attributes. Is there anyone who can give suggestion what should I do and what happened with that?
Here is my code:
import com.ibm.team.repository.common.IContributor; import com.ibm.team.repository.common.IContributorHandle; import com.ibm.team.repository.service.IRepositoryItemService;
showing 5 of 8
show 3 more comments
|
One answer
![]()
Ralph Schoon (62.0k●3●36●43)
| answered Jul 19 '17, 3:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jul 19 '17, 3:51 a.m. If you have to print something in Tomcat you are doing it wrong. If you don't follow the Extensions workshop https://jazz.net/library/article/1000 to be able to debug in Jetty, it is pretty much wasted time to try to help as well.
|
Comments
From a quick look at the code here, it looks like you're missing a few dependencies for
workItem in "workItem.getValue"
itemService in "itemService.fetchItem"
Are these two properly declared in your code?
Yeah I have declare it before. I can get the value of string type attributes , timestamp and enumeration. I only can’t get value if it’s contains a contributor type.
Can you retrieve the value of other custom attributes?
Do you have other project areas to test your code on? Or is it just a single project area?
Not being able to get the subscribers might be caused by an external issue other than the API, so if possible try to check if you can get subscribers in a different project area.
Yeah, I can get the custom attributes as long as the type is not contributor or contributor list.
The code looks ok as long as the custom attribute ID is correct.
Do the other work item API for getting contributors work?
i.e.
getCreator, getOwner & getResolver?
If I retrieve the value of built-in attributes for contributor types (Owner, Modifier, Creator, Resolver), it's working. At the first, I think maybe it's because the library but I can get the the build in contributor attributes.
Can we check whether "customerExperience" is returning a valid attribute?
After
Try:
and see if Contributor is correctly returned
Yeah, it is return correctly,