[rt-users] template modification

Thomas Lau Thomas.Lau at principleone.com
Thu Jan 31 05:12:49 EST 2013


Following is the current situation:



Wed Jan 16 08:31:41 2013: Request 124 was acted upon.



   Transaction : Given to y by o

   Queue       : Test

  Subject     : Test Printer does not work

   Owner       : y

   Requestors  : abc at abc.com

   Status      : new

   Ticket URL  : http://domain.com/Ticket/Display.html?id=81134

   Type:

   Summary:

   ResolvedMethodBy:

   Category:

   Response Time (Minutes):

   SLA         : platinum

   Overdue:

   Client Response:

   DN:

   Problem Status:

   Rework:

   Severity:







This transaction appears to have no content

_______________________________________________________
RT-Attach-Message: yes

{$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.

   Transaction : {$Transaction->Description}
   Queue       : {$Ticket->QueueObj->Name}
   Subject     : {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
   Owner       : {$Ticket->OwnerObj->Name}
   Requestors  : {$Ticket->RequestorAddresses}
   Status      : {$Ticket->Status}
   Ticket URL  : {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
{
my $CustomFields = $Ticket->QueueObj->TicketCustomFields();
while (my $CustomField = $CustomFields->Next()) {
   my $CustomFieldValues=$Ticket->CustomFieldValues($CustomField->Id);
   $OUT .= "   " . $CustomField->Name;
   if ($CustomFieldValues->Count) {
     my $spacer;
     if ( $CustomField->Type ne 'FreeformMultiple' and
          $CustomField->Type ne 'SelectMultiple' ) {
       $spacer = " " x (12 - length($CustomField->Name));
     } else {
       $spacer = "\n";
     }
     $OUT .= $spacer . ": ";
   } else {
     $OUT .= ": \n";
     next;
   }
   while (my $CustomFieldValue = $CustomFieldValues->Next) {
     $OUT .= " " if ( $CustomField->Type eq 'FreeformMultiple' or
                       $CustomField->Type eq 'SelectMultiple' );
     $OUT .= $CustomFieldValue->Content . "\n";
   }
   $OUT .= "\n" if ( $CustomField->Type eq 'FreeformMultiple' or
                       $CustomField->Type eq 'SelectMultiple' );
}
$OUT;
}


{$Transaction->Content()}

How could I cut off all other field down to this?


   Transaction : Given to y by o
   Queue       : Principle One Asia
   Subject     : test change owner
   Owner       : y
   Summary:
   Ticket URL  : http://domain.com/Ticket/Display.html?id=81476

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130131/53c41268/attachment.htm>


More information about the rt-users mailing list