How To Set Attributes as "Read-Only" Based Only on State
The other day I submitted a question to the Forum about how to make an attribute "read-only" based on a State. I was provided with a great answer about using the "Operation Behavior" options and select "Read-Only Attributes for Type and State". I thought this was my answer an went and implemented it, but it is not working correctly. So I am either not implementing this right, or I need another solution.
I have a new Work Item called "Create PR" which has basically just two states (I know, but that is what the customer wants). There is the "Initialization" and the "Defined" state. "Create PR" is accessible from the RQM side via the Defects->Create Defect icon. The menu will pop up and pre-populated with some info and should allow the user to then enter the rest. When the "OK" button is pressed, a "PR" is created and supposed to be "read-only" from RTC now that it is in the "Defined" state. Problem is, when I use the "Read-Only Attributes for Type and State" option, all of the attributes appear as "read-only" even in the "Initialization" state, so the user cannot enter anything. This is true from both the RQM Create PR option and the Create PR option in the RTC drop down menu. When I read the IBM documentation about "Read-Only Attributes for Type and State" it reads "Verifies that a work item that matches the selected types or states can be saved only if the selected attributes are unchanged.". It states "types or states", so either I am not using this option correctly or this option does not provide the capability I am looking for.
Any help here is appreciated.
One answer
My thoughts:
If the work item once saved is in the "Defined" then your work item actually has only one state - the temporary state when it is not initially saved is not a state, since the state of the work item will be "Defined"once it is saved. Thus the operation behavior assumes that the work item is already in that state and prevents saving.
You would need a real state like "Initialized" thet the work item has once initially saved. Then the operation behavior would work - once someone has actually selected a state change, they could no longer change the attributes.
I think you would need a cutom advisor the way I think your process is customited. Maybe a condition would work, because the condition does not know the state after the save. Not sure if a condition works across the tools.