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

precondition: limit workitem types to iteration types

Hey Everyone,

We are trying to create a precondition to limit the type of workitems that can be planned against iterations with a certain iteration type - for instance to keep tasks away from a product backlog or making plan only with a custom workitem type.

now this precondition should be activated on the save workitem and should be created as an advisor but I dont know how to extract the iteration type and the workitem type from the IWorkItem I guess its stored in the getTarget() but I dont know how to handle this.

My sample code :

public class ExampleOperationAdvisor implements IOperationAdvisor {

public void run(AdvisableOperation operation,
IProcessConfigurationElement advisorConfiguration,
IAdvisorInfoCollector collector, IProgressMonitor monitor)
throws TeamRepositoryException {

Object data = operation.getOperationData();
if (data instanceof ISaveParameter) {
ISaveParameter saveParameter = (ISaveParameter) data;
IAuditableCommon auditableCommon= saveParameter.getSaveOperationParameter().getAuditableCommon();
IWorkItemCommon workItemCommon= auditableCommon.getPeer(IWorkItemCommon.class);
IAuditable auditable = saveParameter.getNewState();


if (auditable instanceof IWorkItem)
{

IWorkItem workItem = (IWorkItem) auditable;

0 votes



One answer

Permanent link
On Wed, 07 Jul 2010 11:38:04 +0000, dk11419 wrote:

We are trying to create a precondition to limit the type of workitems
that can be planned against iterations with a certain iteration type -
for instance to keep tasks away from a product backlog or making plan
only with a custom workitem type.

I can't help with the Work Item API, but I'm wondering if you've tried to
achieve this behavior simply using permissions? Since you can configure
the permissions differently for each iteration type, it would be possible
to only grant permissions to create workitems of a particular type within
a particular iteration type.

- Jared
---------------------
Jazz Team Process

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: Jul 07 '10, 7:29 a.m.

Question was seen: 6,148 times

Last updated: Jul 07 '10, 7:29 a.m.

Confirmation Cancel Confirm