How to set RTC workitem attribute's behavior in UI ?
I checked there are some document about how to set attributes based on the condition when user saves a work item(https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Conditions).
Currently I need to set some customized workitem attributes when deliver changesets(associated with workitem) or via someother operations rather than saving workitem. And there are no such default "Required Attributes For Condition" preconditions for deliver operation, my question is - does RTC provide any API to set RTC workitem attribute's behavior in user interface?
Thanks a lot.
Accepted answer
3 other answers
Comments
as far as I know, there is no mechanism to prevent changes in the UI itself on the fly. (make a field actually read only occasionally)..
I have only seen reporting errors on changes not allowed by some precondition.
the two advisors, Read Only for Condition and Read Only for type and State prevent saving if the specified fields have been changed in the UI.
they do NOT prevent the UI from allowing changes prior to saving
I have tested this and also looked at the internal code. The preconditions "read only for type and state" and read only for condition" do set the attribute read only preventing an input. The preconditions "Required for ...." show the attributes requiredness by displaying the asterisk. See https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/ for how that is done. The post also explains that and why you can not create custom advisors that do this.
Comments
I don't understand what you said.. the advisors both say 'cannot be saved if changed'
which means the UI will allow the change, but the save is stopped..
this is NOT the same as disabling data entry in a field (IN THE UI) so that data CANNOT be changed (I do not know how to do this with RTC today. )
IF you mean has some visual indication that the field should not be changed . (like the star next to required fields) I don't find that useful at all.