rt 4.2.13 ticket#13852
[freeside.git] / rt / lib / RT / CustomField.pm
index 6b9d57b..3940e83 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -1717,7 +1717,7 @@ sub _CanonicalizeValue {
     my $self = shift;
     my $args = shift;
 
-    my $type = $self->_Value('Type');
+    my $type = $self->__Value('Type');
     return 1 unless $type;
 
     my $method = '_CanonicalizeValue'. $type;
@@ -2362,6 +2362,11 @@ sub __DependsOn {
 # Custom field values
     push( @$list, $self->Values );
 
+# Applications of this CF
+    my $applied = RT::ObjectCustomFields->new( $self->CurrentUser );
+    $applied->LimitToCustomField( $self->Id );
+    push @$list, $applied;
+
 # Ticket custom field values
     my $objs = RT::ObjectCustomFieldValues->new( $self->CurrentUser );
     $objs->LimitToCustomField( $self->Id );