fix phantom customer links (fix user links)
authorIvan Kohler <ivan@freeside.biz>
Thu, 19 Jul 2018 15:21:04 +0000 (08:21 -0700)
committerIvan Kohler <ivan@freeside.biz>
Thu, 19 Jul 2018 15:21:04 +0000 (08:21 -0700)
rt/lib/RT/Record.pm

index 8f1b5be..b700fa7 100755 (executable)
@@ -1282,9 +1282,12 @@ sub Customers {
 
       $self->{'Customers'} = $self->MemberOf->Clone;
 
+      my $RecordType = $self->RecordType;
+      my $uri_type = $RecordType eq 'Ticket' ? 'ticket' : "RT::$RecordType";
+
       $self->{'Customers'}->Limit( FIELD    => 'Base',
                                    OPERATOR => 'STARTSWITH',
-                                   VALUE    => 'fsck.com-rt://%/ticket/',
+                                   VALUE    => 'fsck.com-rt://%/'.$uri_type.'/',
                                  );
 
       for my $fstable (qw(cust_main cust_svc)) {