Changes between Version 24 and Version 25 of DynamicFieldsPlugin
- Timestamp:
- Sep 19, 2011, 2:50:07 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DynamicFieldsPlugin
v24 v25 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = Dynamically hide, default, copy, clear, etc. ticket fields =3 = Dynamically hide, default, copy, clear, validate, etc. ticket fields = 4 4 5 5 '' '''NOTE: I suggest you use the 0.11 branch only even for Trac 0.12 installations. The Trac 0.12 branch has some issues. The plan is to merge the two branches to support both Trac 0.11 and 0.12 on one branch. Thanks. - robguttman''' '' … … 13 13 * Clear a field's value when another field's value changes 14 14 * Copy one field's value to another field 15 * Validate a field's value 15 16 16 17 … … 131 132 The above example introduces the plugin's user preference facility described next. 132 133 134 135 ==== Validate rule ==== 136 Some fields may be required (i.e., can't be empty) or must not contain some specific values. For example: 137 {{{ 138 [ticket-custom] 139 owner.invalid_if = 140 severity.invalid_if = pick one 141 }}} 142 143 The above will prevent the ticket from being submitted if either the owner field is empty or the severity field's value equals "pick one". The value for the {{{invalid_if}}} rule can be empty or any regular expression. 144 145 133 146 == User preferences == 134 147 Any rule expressed above can be configured to allow users to set preferences for them by appending ''(pref)'' to the end of the rule. For example, here's one of the hide rules from above: