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

Work Item editability restrictions based on State and Roles

How can I restrict a workitem's editability based on state change and only a set roles wont be allowed to edit it.

E.g. A workitem moves from Unassigned to submit state the "team members" loses editability once it moves to submit however the "Team Owners" will have access to modify the item to move it to further states.

Any help on how to go about it ?

0 votes


Accepted answer

Permanent link
there is no way to do this out of the box. you could write a java server side extension that could implement the logic you describe.

see the extensions workshop to get started on learning how to build one of these.
https://jazz.net/library/article/1000

the server side apis are not documented, but Ralph has a great blog that has lots of samples
https://rsjazz.wordpress.com/
Tony Rajan selected this answer as the correct answer

0 votes

Comments

Sam, thanks for the https://rsjazz.wordpress.com/
this is what we were looking for 

Solution Summary

The condition, lets call it User Role for Type and State Condition is a Java based extension for the Eclipse client and the RTC server. It allows configuring roles mapped to work item type categories and states.
The condition checks if the current work items category and state has roles configured. If roles are found, and the user has any of the roles, the condition returns true, false otherwise.
This condition can be configured and be used to make work item attributes read-only or required for a work item type category in a specific state based on the roles a user has in this context.

But alas :(

The code can be downloaded from DropBox here. "Please note, there might be restrictions to access DropBox and the code in your company or download location."

If your company or your country blocks DropBox, there is nothing I can really do about. Try it at home.


One other answer

Permanent link
Hi  Tony,

Please find the links below it will help you.

https://jazz.net/forum/questions/134801/type-and-role-based-and-state-based-work-item-attribute-change-permissions

https://jazz.net/forum/questions/79903/read-only-work-item-attributes-based-on-role-and-attribute

Regards,
Arun.

0 votes

Comments

Arun thanks for pitiching in but we are not looking for just non-editability of attributes in a state by role but the entire workitem as a whole.

The question remains, how the user should know that the work item is not editable. with just a custom advisor he won't. Carefully read https://rsjazz.wordpress.com/2015/08/07/a-custom-condition-to-make-attributes-required-or-read-only-by-role-version-2/ and the reasoning.

If you don't use a condition to make the attributes read only, the user will basically think they can change the work item attributes and be surprised and annoyed when pressing save. So would I .

Don't make the state read only using that condition, the condition looks at the current state and the workflow action and the state calculated from that is basically what it uses as context for its work.



And keep in mind that you can also use role based permissions to allow or deny changing of attributes as well as prevent state changes. In this case the user gets a notification in the UI as well, as far as I know. See

  Lab 3 to 5 for more information.

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

Question asked: Oct 15 '15, 7:13 a.m.

Question was seen: 3,531 times

Last updated: Oct 15 '15, 9:10 a.m.

Confirmation Cancel Confirm