[Rt-commit] rt branch, 4.4/canonicalize-custom-fields, repushed

Shawn Moore shawn at bestpractical.com
Wed Jun 8 14:22:19 EDT 2016


The branch 4.4/canonicalize-custom-fields was deleted and repushed:
       was 673993b2a0c0a6560c0dfca671bd3203d872a72a
       now f7f2d9070e61198627fbea4dff679549717f3703

 1:  a851ab5 < --:  ------- Limit ExternalAuth enabled setting to ExternalSettings
 2:  434b36b < --:  ------- Only attempt to set External Info/Auth if values are available
 3:  9f2d352 < --:  ------- Add UniqueValues column to Custom Fields
 4:  b522bba < --:  ------- Enforce CustomField UniqueValues
 5:  4913478 < --:  ------- Basic tests for unique custom field values
--:  ------- >  1:  aa6e1a0 Docs and logging for CF ValuesClass and RenderType
 6:  7784c04 =  2:  029b886 Add CanonicalizeClass to CustomField table
 7:  1437cfd !  3:  53599b1 Scaffolding for CustomField CanonicalizeClass
    @@ -242,7 +242,7 @@
     +
     +sub IsCanonicalizeType {
     +    my $self = shift;
    -+    my $type = @_? shift : $self->Type;
    ++    my $type = @_ ? shift : $self->Type;
     +    return undef unless $type;
     +    return $FieldTypes{$type}->{canonicalizes};
     +}
    @@ -253,6 +253,14 @@
          return undef;
      }
      
    ++=head2 SetCanonicalizeClass CLASS
    ++
    ++Writer method for the CanonicalizeClass field; validates that the custom
    ++field can use a CanonicalizeClass, and that the provided CanonicalizeClass
    ++passes L</ValidateCanonicalizeClass>.
    ++
    ++=cut
    ++
     +sub SetCanonicalizeClass {
     +    my $self = shift;
     +    my $class = shift;
    @@ -269,6 +277,17 @@
     +    }
     +    return $self->_Set( Field => 'CanonicalizeClass', Value => $class, @_ );
     +}
    ++
    ++=head2 ValidateCanonicalizeClass CLASS
    ++
    ++Validates a potential CanonicalizeClass value; the CanonicalizeClass may be
    ++C<undef> (which make this custom field use no special canonicalization), or
    ++a class name in the listed in the
    ++L<RT_Config/@CustomFieldValuesCanonicalizers> setting.
    ++
    ++Returns true if valid; false if invalid.
    ++
    ++=cut
     +
     +sub ValidateCanonicalizeClass {
     +    my $self = shift;
    @@ -373,7 +392,8 @@
     +
     +=head2 CanonicalizeValue
     +
    -+Receives a parameter hash including C<CustomField> and C<Content>.
    ++Receives a parameter hash including C<CustomField> (an L<RT::CustomField>
    ++object) and C<Content> (a string of user-provided content).
     +
     +You may also access C<< $self->CurrentUser >> in case you need the user's
     +language or locale.
 8:  b19cca2 !  4:  b991889 Admin UI for CF canonicalizer
    @@ -45,6 +45,10 @@
     +                            loc("Canonicalizer"), $original, $CanonicalizeClass );
     +            }
     +        }
    ++        else {
    ++            RT->Logger->debug("Unable to SetCanonicalizeClass to '$CanonicalizeClass': $msg");
    ++        }
    ++
     +        push @results, $msg;
     +    }
      
 9:  75153d2 =  5:  d285730 Implement custom field canonicalization
10:  bd545ee =  6:  30c7bf5 Ship Uppercase and Lowercase canonicalizers in core
11:  15dd822 =  7:  baa8e1f Canonicalize default values on custom fields
12:  673993b =  8:  f7f2d90 Tests for custom field canonicalizers



More information about the rt-commit mailing list