Is there a pre-condition to restrice only the owner can close the WI?
![]()
Jia Jia Li (805●8●157●192)
| asked Nov 05 '12, 2:10 a.m.
edited Nov 05 '12, 2:39 a.m. by Ralph Schoon (63.3k●3●36●46)
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!
|
2 answers
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Nov 05 '12, 2:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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. |
![]()
Geoffrey Clemm (30.1k●3●30●35)
| answered Nov 05 '12, 3:51 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
|
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.