Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Creating work items with plain java

I'm using plain java and I've got as far as making work items in a jazz project, currently though I can't figure out how to set the owner of a work item.
I get that your meant to use workItem.setOwner(fOwner); where fOwner is of the type IContributorHandle. I think what I need to do is get a list of users from the server and select it from that but I've no idea how.

Any help with this would be greatly appreciated.

0 votes



2 answers

Permanent link
I'm using plain java and I've got as far as making work items in a jazz project, currently though I can't figure out how to set the owner of a work item.
I get that your meant to use workItem.setOwner(fOwner); where fOwner is of the type IContributorHandle. I think what I need to do is get a list of users from the server and select it from that but I've no idea how.

Any help with this would be greatly appreciated.


Laurence, the Extending Team Concert Forum discusses these things.

You can resolve a handle using auditableClient.resolveAuditable(). You can get a contributor by ID and other means.



IAuditableClient auditableClient = (IAuditableClient) teamRepository
.getClientLibrary(IAuditableClient.class);

IContributor aUser = (IContributor ) auditableClient.resolveAuditable(handle,...)

IContributor idUser = teamRepository.contributorManager().fetchContributorByUserId(fContributorUserID, null);

0 votes


Permanent link
Laurence, the Extending Team Concert Forum discusses these things.

You can resolve a handle using auditableClient.resolveAuditable(). You can get a contributor by ID and other means.



IAuditableClient auditableClient = (IAuditableClient) teamRepository
.getClientLibrary(IAuditableClient.class);

IContributor aUser = (IContributor ) auditableClient.resolveAuditable(handle,...)

IContributor idUser = teamRepository.contributorManager().fetchContributorByUserId(fContributorUserID, null);



Cheers for your help, the way I found to do it was get all the users off the server using: IContributorHandle[] contributors = projectArea.getMembers();

then convert each one to a IContributor via ITeamRepository and get the item back, you can then get the details from the item

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Aug 24 '11, 6:13 a.m.

Question was seen: 8,018 times

Last updated: Aug 24 '11, 6:13 a.m.

Confirmation Cancel Confirm