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

Is there a pre-condition to restrice only the owner can close the WI?

Hi, 
For the WorkItem, we want to set only the owner can close the WI. Is there exist pre-condition for it?
Thanks very much!

0 votes



2 answers

Permanent link
You probably are interested in the functionality requested by work item Add special "owner" and "creator" roles, that specifies what the "owner" and "creator" respectively of an object can do to the object (88779) . If this is the kind of thing you had in mind, please feel free to add a comment to that work item indicating your interest/support.

0 votes


Permanent link
Hi Jia,

quickly looking into the list of available preconditions, I can not spot one.

But it should be really easy to create Look up how to check a state change in the Extensions workshop. The code to check who does the state change should look similar to,

                IWorkItem workItem = (IWorkItem) auditable;
                IContributorHandle loggedIn = this.getAuthenticatedContributor();
                IContributorHandle owner = workItem.getOwner();
                if(!(owner!=null && owner.getItemId().equals(loggedIn.getItemId()))){
                    IAdvisorInfo info = collector.createProblemInfo("Fail", "The work item contained the string fail", "error");
                    collector.addInfo(info);
                }

Assuming you extend AbstractService as you should.

1 vote

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
× 6,117

Question asked: Nov 05 '12, 2:10 a.m.

Question was seen: 4,760 times

Last updated: Nov 05 '12, 3:51 p.m.

Confirmation Cancel Confirm