X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FRecord.pm;h=5c0bd1491921a410a8fa19b9e645f99d1ece8afc;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hp=8f1b5be5ed1ad29d39481859303d856ffdc98731;hpb=07bf36bccc4979b12db49b0f71524de4296f3717;p=freeside.git diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm index 8f1b5be5e..5c0bd1491 100755 --- a/rt/lib/RT/Record.pm +++ b/rt/lib/RT/Record.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -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)) { @@ -2193,6 +2196,7 @@ sub _AddCustomFieldValue { unless ( $new_value_id ) { return ( 0, $self->loc( "Could not add new custom field value: [_1]", $msg ) ); } + if ( $args{'RecordTransaction'} ) { my ( $tid, $msg ) = $self->_NewTransaction( Type => 'CustomField',