It's all about the answers!

Ask a question

Validator is grayed out when configuring attributes


Mike Shkolnik (9809161143) | asked Oct 25 '13, 4:11 p.m.
edited Oct 25 '13, 4:17 p.m.
I want to limit the number of hours someone can enter in a custom duration field. As of 4.0.1 (which we have), this is supposed to be possible via the Eclipse UI. However, for some reason the option is grayed out. So is Default Value. I also tried Decimal for the type with the same results. I want to limit the selection to 24 hours max. Attribute Validation is enabled in preconditions.

Validator is gray


One answer



permanent link
Millard Ellingsworth (2.5k12431) | answered Oct 25 '13, 8:35 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
edited Oct 25 '13, 8:37 p.m.
You need to create Attribute Customizations for Default Value and Validators if you want to use them (there are no default one). Lots of good details here: https://jazz.net/library/article/1003/#validators 

Now, the bad news for now is that according to this page: https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript an attribute of type Duration is not safely used via scripting (look for this section: Only values of the following attribute types can be safely read by and returned from scripts:). Per the example in the first article, this is doable if you can use a numeric type for the attribute.


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.