[rt-users] Customfields question

Emmanuel Lacour elacour at easter-eggs.com
Wed Nov 25 05:04:28 EST 2009


On Wed, Nov 25, 2009 at 10:46:18AM +0100, Richard Pijnenburg wrote:
> Hi Emmanuel,
> 
> I found that file yeah.
> It's only unclear what code I need to make the filter for it.
> Unfortunate my coding experience is more in php then perl :-)
> 

try something like this (not tested):

diff --git a/share/html/Elements/ShowCustomFields b/share/html/Elements/ShowCustomFields
index ddb8b72..ad8869d 100644
--- a/share/html/Elements/ShowCustomFields
+++ b/share/html/Elements/ShowCustomFields
@@ -83,7 +83,7 @@ $m->callback(
 my $print_value = sub {
     my ($cf, $value) = @_;
     my $linked = $cf->LinkValueTo;
-    if ( $linked ) {
+    if ( $linked && $m->request_comp->path !~ m|/SelfService/| ) {
         $m->out('<a href="'. $value->LinkValueTo .'" target="_new">');
     }
     my $comp = "ShowCustomField". $cf->Type;
@@ -98,7 +98,7 @@ my $print_value = sub {
     } else {
         $m->out( $m->interp->apply_escapes( $value->Content, 'h' ) );
     }
-    $m->out('</a>') if $linked;
+    $m->out('</a>') if ( $linked && $m->request_comp->path !~ m|/SelfService/| );
 
     # This section automatically populates a div with the "IncludeContentForValue" for this custom
     # field if it's been defined




More information about the rt-users mailing list