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.
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.
2 answers
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);
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.
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
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