It's all about the answers!

Ask a question

How to set RTC workitem attribute's behavior in UI ?


kelly hu (21216) | asked Aug 25 '16, 2:42 a.m.
Hi RTC admins,

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


permanent link
sam detweiler (12.5k6195201) | answered Aug 25 '16, 7:42 a.m.
the answer is No.. you would have to write a java server side participant
kelly hu selected this answer as the correct answer

3 other answers



permanent link
kelly hu (21216) | answered Aug 25 '16, 9:00 a.m.
So even I write a java server side precondition, we still cannot use API to dynamically enable field's requireness on the UI, it just post error message, right?  (I've done the precondition to post error, just want to confirm, thanks.)

Comments
sam detweiler commented Aug 25 '16, 9:27 a.m.

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.


sam detweiler commented Aug 25 '16, 12:18 p.m.

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


Ralph Schoon commented Sep 14 '16, 4:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


permanent link
Ralph Schoon (63.5k33646) | answered Aug 25 '16, 2:53 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The UI shows required or read only for conditions and the built in advisors. See https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/ for how.

Comments
sam detweiler commented Aug 25 '16, 2:58 p.m. | edited Aug 25 '16, 2:59 p.m.

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.


permanent link
kelly hu (21216) | answered Aug 25 '16, 11:11 p.m.
I agree the answer is no, we cannot dynamic set field requiredness(add the star to required fields) in deliver action instead of saving work item action, thanks for the comments.

Your answer


Register or 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.