[rt-users] Final Reply (not Comment) on Resolve Patch?

Andy Harrison aharrison at gmail.com
Wed Dec 22 15:09:50 EST 2004


On Wed, 22 Dec 2004 10:03:56 -0800, Mike Conley <conley at kana.com> wrote:
> Yes, this works fine on that page.  It is possible I just have a bad
> idea of what the normal workflow for handling a ticket is, but generally
> people "Take" a ticket, go back and forth with the requestor for a while
> (Ticket/Update page), and then "Resolve" the ticket.  The page you end
> up on when you hit "Resolve" has a field called "Message:" but this is
> really a comment and not a message sent back to the requestor when the
> ticket is resolved.  We end up with a lot of resolved tickets but with
> users that didn't get the final message such as "I've put the document
> you wanted in \\foo\bar\doc.txt" -- it is a little confusing.

I actually made a custom resolver template that bundles the last
comment with the resolve notification.


Make this a global template and then just create normal OnResolve
scrips that use that template.

>>>>>----  Cut Here (make sure there's no blank line at the very top) ----<<<<<<
Subject: Resolved: {$Ticket->Subject}

This is an automated message to notify you that ticket [{$rtname}
#{$Ticket->id()}] has been resolved.  Closing comments are included at
the bottom of this message.

Thank you,
{$Ticket->QueueObj->CorrespondAddress()}

-------------------------------------------------------------------------
Ticket Data:
{
  my $CustomFields = $Ticket->QueueObj->CustomFields();
  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 (20 - 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;
 }

-------------------------------------------------------------------------
Closing Comments:

{
  my $resolution_comment;
  my $Transactions = $Ticket->Transactions;
  $Transactions->GotoFirstItem;
  while (my $Transaction = $Transactions->Next) {
    $resolution_comment = $Transaction->Content() if
$Transaction->Type eq 'Comment';
  }
  $OUT .= $resolution_comment;
  $OUT;
}
>>>>>>>>----end----<<<<<<<

-- 
Andy Harrison



More information about the rt-users mailing list