It's all about the answers!

Ask a question

how to get the owner(icontributorHandle) by the owner's name

SHENG HUI (622) | asked Aug 02 '10, 2:24 a.m.
i'm writing a query to get the workitems that belong to a specified owner. And i only know the name of the owner.
the following is the way that i get the query expression:

ownerAttribute= findAttribute(projectArea, auditableClient, IWorkItem.OWNER_PROPERTY, monitor);
ownerExpression= new AttributeExpression(ownerAttribute, AttributeOperation.EQUALS, owner_name);

However,it doesn't work,and i wonder that is because of the attribute owner_name is String ,while i need a IContributeHandle, is that right?
if it is ,how can i get this just by the name of the handle.
I appreciate your help.

Be the first one to answer this question!

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.