It's all about the answers!

Ask a question

Workitem setting Approvals programmatically


0
1
EclipseTalk . (32736161) | asked Mar 24 '10, 4:31 p.m.
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

One answer



permanent link
EclipseTalk . (32736161) | answered Mar 24 '10, 4:49 p.m.
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);
}

Your answer


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