[RTC] How to restrict Close Workitem transition to Creator or Owner of the workitem
We need to restrict certain workflow actions to the workitem creator or the current owner. We have already checked the Permissions and see that these are applicable only to the roles.
Ideally, we would like to avoid having to code and try to use the built-in feature.
Would appreciate any suggestions on how this scenario may be achieved.
Ideally, we would like to avoid having to code and try to use the built-in feature.
Would appreciate any suggestions on how this scenario may be achieved.
2 answers
I believe you would have to write your own custom pre-condition to handle this.
There is a work item to provide this functionality: Add special "owner" and "creator" roles, that specifies what the "owner" and "creator" respectively of an object can do to the object (88779)
Please feel free to add a comment to this work item indicating your interest/support.
There is a work item to provide this functionality: Add special "owner" and "creator" roles, that specifies what the "owner" and "creator" respectively of an object can do to the object (88779)
Please feel free to add a comment to this work item indicating your interest/support.
Hi Geoffrey,
Thanks for the link. I have written a comment there indicating my support.
Since custom pre-condition seems to be the only way to go, we gave this a try too.
However, we seem to have hot a road block with retrieving the currently logged in users id/name using Javascript. Any ideas?
Regards,
Priya
Thanks for the link. I have written a comment there indicating my support.
Since custom pre-condition seems to be the only way to go, we gave this a try too.
However, we seem to have hot a road block with retrieving the currently logged in users id/name using Javascript. Any ideas?
Regards,
Priya
Comments
You have to write a Java Based precondition/Adviser. Javascript is too limited for what you try to do.
The only example I have on my blog is this one: https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ it is for SCM delivery, but it should provide you with all the links you need. Especially
Advisors
- Extend the extension point com.ibm.team.process.service.operationAdvisors
- Implement the interface com.ibm.team.process.common.advice.runtime.IOperationAdvisor
- Shall not modify the changes they are triggered for
You can find a list of extension points and operation ID’s here in the Jazz Wiki.
You also want to look at https://rsjazz.wordpress.com/2012/11/26/manipulating-work-item-states/