get defect or task owner
2 answers
Hi Gabi,
Tasks and defects are nothing but workitems. There is a direct method available to fetch the owner of the workitem.
iWorkItem.getOwner();
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.
Cheers,
Ajay
Tasks and defects are nothing but workitems. There is a direct method available to fetch the owner of the workitem.
iWorkItem.getOwner();
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.
Cheers,
Ajay
Comments
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
Gabi
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);
System.out.println(iContributor.getName());
Thanks allot.
it solved my problem.
have a nice day
gabi