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

Workitem setting Approvals programmatically

Hello,
How can one set the Approvals for a workitem programmatically? I see only a getter - workItem.getApprovals()
Should one use the setValue() method?
Thanks

1

0 votes



One answer

Permanent link
I got it....

IApprovals approvals= workItem.getApprovals();
IApprovalDescriptor descriptor= approvals.createDescriptor(WorkItemApprovals.REVIEW_TYPE.getIdentifier(), "Review");
for (IContributorHandle reviewer: reviewers) {
IApproval approval= approvals.createApproval(descriptor, reviewer);
approvals.add(approval);
}

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
× 10,938

Question asked: Mar 24 '10, 4:31 p.m.

Question was seen: 5,998 times

Last updated: Mar 24 '10, 4:31 p.m.

Confirmation Cancel Confirm