Read-Only and Required Attribute based on Action.
I want to configure Read-Only and Required Attribute based on Action.
e.g The state of a work item is now "In Progress". If you choose "Complete" action, attribute A is Read-Only and attribute B is Required. If you choose "Stop Working" action, attribute C is Required. Is it possible? I looked at following documents, but I was not able to figure it out. https://jazz.net/library/article/997#dyncondition https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Conditions |
2 answers
Ralph Schoon (63.4k●3●36●46)
| answered Feb 25 '13, 4:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Feb 25 '13, 6:40 a.m.
Hi, in RTC 4.x you can control read only and required attributes using operational behavior in the Process configuration>Team Configuration>Operational Behavior. The screen shot below shows the ones you are looking for. The ones that say "... For Condition" can be used together with JavaScript conditions to provide even more flexibility.
Comments
ken shounaga
commented Feb 25 '13, 6:30 a.m.
Hi Ralph
Hi, in RTC 4.x you have at least the ability to make attributes Read-Only or Required for a state. That was, I believe, what the question was about. The work item does not show while the state changes, so you can tie it only to the state.
Ralph Schoon
commented Feb 25 '13, 6:46 a.m.
| edited Feb 25 '13, 6:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I should add, the Enactment Workshop mentioned above shows how you can access the state of a work item. You can not access the workflow action that triggered the state change in JavaScript. You can also not access the previous state of the work item, neither do you have access to the interfaces that provide you with the workflow itself. This has been discussed several times in this forum. You might want to search for the questions that discuss it.
ken shounaga
commented Feb 25 '13, 7:23 a.m.
Hi Ralph,
1
No, as far as I can tell you can not do what you request on a action for the reasons above.
And, to be honest, I don't understand why the action should be the element to look at. Would you have different read-only attributes for the same state if you got there on a different way? That would be very confusing.
ken shounaga
commented Feb 25 '13, 7:59 a.m.
Hi Ralph,
showing 5 of 7
show 2 more comments
|
Hi Ralph,
I just wanted to comment on the scenario where this would make sense... and see if you have a work around. I have added a bunch of attributes via "Required Attributes for Type and State" for State B. When my work item goes from State A to State B, the user is required to fill in these attributes. I also have an attribute that becomes read only (let's call it attribute Y), if attribute X is set. I would like Y to be required when moving from State A to State B, if attribute X is not set, but not required if attribute X is set. Essentially, my requirement is a mix of "Required Attributes for Type and State" and "Required Attributes for Condition". However, due to the reasons you mentioned above, I can not combine these two behaviours. That is, I can only read the State after the work item has made it to State B... and I don't want to make these attributes required in State A. Any Ideas? Comments You can try a JavaScript condition. as mentioned in one of the comments above.
Tanya Scheffler
commented Aug 12 '14, 9:44 a.m.
I figured out a workaround... though it is not perfect. I used one of the attributes that was required (via Required Attributes for Type and State) and I used it as a condition in my javascript code. That is, if requiredAttribute is set and attribute X is not set, then Y is required, etc...
|
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.