Changes between Version 34 and Version 35 of DynamicFieldsPlugin


Ignore:
Timestamp:
May 15, 2012, 9:36:07 PM (12 years ago)
Author:
Rob Guttman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DynamicFieldsPlugin

    v34 v35  
    153153The 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.  Hidden fields do not get validated.
    154154
     155You can also specify a condition under which the validation should be applied:
     156{{{
     157[ticket-custom]
     158phase.invalid_if.1 = verifying
     159phase.invalid_when.1 = .codereviewstatus .pending (msg:Pending code reviews.)
     160phase.invalid_if.2 = verifying
     161phase.invalid_when.2 = .codereviewstatus:last .rejected (msg:The last code review did not pass.)
     162}}}
     163
     164The above example is for the [wiki:CodeReviewerPlugin CodeReviewer plugin] when using its ticket reference macro to prevent a ticket moving a custom {{{phase}}} field past "codereview" if there are either pending reviews or the last changeset has not passed review.  The value is a jQuery selector - if it returns one or more items then the validation is applied, else it's skipped.  The {{{.1}}} and {{{.2}}} suffix for the option keys are to group the {{{invalid_if}}} and {{{invalid_when}}} parts together.
    155165
    156166==== Set rule ====