It's all about the answers!

Ask a question

get defect or task owner

Gabi mordov (634) | asked Jun 02 '14, 11:34 p.m.
 Hi all ,
how can i read Task or defect owner by java api???


2 answers

permanent link
Don Yang (7.6k21105137) | answered Jun 03 '14, 12:49 a.m.
Hi, Gabi

Please check with sample code in Ralph's blog here:

There you can find out more than getting work item's owner by Java API.


permanent link
Ajay Mallikarjunaiah (148310) | answered Jun 03 '14, 8:49 a.m.
Hi Gabi,

Tasks and defects are nothing but workitems. There is a  direct method available to fetch the owner of the workitem.


It returns IContributorHandle, out of which you can get the original contributor.

Kindly let me know if this is not what you are looking for.


Gabi mordov commented Jun 05 '14, 12:32 a.m.

Hi Ajay,

i was already tried  iWorkItem.getOwner(); 
and i am getting IContributorHandle.
but how can i get an owner name from this class???

This is my actual problem.

Thanks again

Ajay Mallikarjunaiah commented Jun 05 '14, 1:16 a.m. | edited Jun 05 '14, 1:36 a.m.

You can IItem from IContriubutor in following way, and in turn the name of contributor....,

IContributorHandle iContributorHandle = iWorkItem.getOwner();
IContributor iContributor=(IContributor)repository.itemManager().fetchCompleteItem(iContributorHandle,
                IItemManager.DEFAULT, monitor);

Gabi mordov commented Jun 08 '14, 12:31 a.m.

Thanks allot.

it solved my problem.

have a nice day


Your answer

Register or to post your answer.