Retrieve the username of the modifier of a workItem
4 answers
wiattrib = com.ibm.team.workitem.api.common.WorkItemAttributes
mod_by = workItem.getValue(wiattrib.MODIFIED_BY)
is for a java script based customization. You are apparently trying to create an Advisor or Participant.
Please provide that kind of information in your question next time.
Please see http://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ how to get an attribute value on the server (in updateParent() and getDuration()). You are looking for the attribute Id modifiedBy or maybe try unsing IWorkItem.MODIFIED_BY_PROPERTY.
Thank you Ralph, for replying. I was able to get help to retrieve the userId. The following worked for me.
IContributor authenticatedContributor = (IContributor)(getService(IRepositoryItemService.class).fetchItem(getAuthenticatedContributor(), null));
authenticatedContributor.getUserId();
Thanks,
Ananya
IContributor authenticatedContributor = (IContributor)(getService(IRepositoryItemService.class).fetchItem(getAuthenticatedContributor(), null));
authenticatedContributor.getUserId();
Thanks,
Ananya