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

RTC approval

hi me name is kim.

I'm styding server -side of RTC API
i know create approval through contributor-id but
i'd like to find contributor-id through contributor-name 
and then i'd like to create approval through contributor-id
i can't find  contributorManager of server-side...

this is my client approval source.

String user = "KIM";
IContributorHandle contributorHandle = null;
IContributorManager ctm = repo.contributorManager(); 
List<IContributor> contributors = ctm.fetchAllContributors(monitor);
for (IContributor contributor : contributors) {
if (contributor.getName().equals(user)) {
contributorHandle = (IContributorHandle) contributor
.getItemHandle();
}
}
IApprovals approvals = workItem.getApprovals();
IApprovalDescriptor descriptor = approvals.createDescriptor(
WorkItemApprovals.APPROVAL_TYPE.getIdentifier(),"comment");
IApproval approval = approvals.createApproval(descriptor,contributorHandle);
approvals.add(approval);

0 votes



One answer

Permanent link
Kim, the Server side API looks like this:

        IContributorService contributorService = getService(IContributorService.class);
       
        IContributorHandle approver = contributorService.fetchContributorByUserId(getApproverFromOwner(newState.getOwner()));

There seems to be no fetch for all contributors. You would have to get the project area and the team areas or another service to get all contributors.

You can use the Eclipse Plugin Development environment to search the SDK for information such as contributor handles returned by a call.

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: Nov 26 '12, 9:27 p.m.

Question was seen: 4,248 times

Last updated: Nov 27 '12, 2:09 a.m.

Confirmation Cancel Confirm