how to check whether the user is archived on server side
![]()
Hi
The following is my scenario
Defect nneds to be re assigned to the creator of the defect when the defect is set to implemented.
My problem is what if the user is archived?
I just want to show information for the developer that the user is archived and assign it to someone else.
for this I need to know whether the user is archived or not.
I use the following code .
workItem.getCreator();
now I have the creator but there is no method to find out whether he is archived.
Thanks
Surender
|
2 answers
![]()
The following is the code to know whether the user is archived or not on the server side.
public void run(AdvisableOperation operation,
IProcessConfigurationElement participantConfig,
IParticipantInfoCollector collector,
IProgressMonitor monitor) throws TeamRepositoryException
{
IRepositoryItemService itemService ;
if (itemService == null)
{
itemService = getService(IRepositoryItemService.class);
}
//code to get the workitem reference
IContributorHandle contributorHandle1 = workItem.getCreator();
IContributor contributor = (IContributor)itemService.fetchItem(contributorHandle1, null);
if(contributor .isArchievd()) {
System.out.println("Creator of the workitem is archived");
}
|