Hi Mark,

Here's the scrip we use to resolve tickets via e-mail.

In order to resolve a ticket this way, the e-mail must be from an AdminCc for that queue and it must contain the word "Ok" on the first line.

Description: Resolved by e-mail
Condition: User Defined
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

Custom condition:
{ ### True if e-mail contains 'ok' - sets owner, resolves ticket
  my $Transaction = $self->TransactionObj;
  my $CreatorId = $Transaction->CreatorObj->Id;
  my $Queue = $self->TicketObj->QueueObj;
  my $val = $Transaction->Type eq 'Correspond'
         && $Queue->IsAdminCc($CreatorId)
         && $Transaction->Content  =~ /\bok\s/i;
  return $val;
}

Custom action prep code:
return 1;

Custom action cleanup code:
### Set Set owner to e-mail sender, status to 'resolved'
my $Ticket = $self->TicketObj;
my $Transaction = $self->TransactionObj;
my $CreatorId = $Transaction->CreatorObj->Id;
$Ticket->_Set(Field=>'Owner', Value=>$CreatorId, RecordTransaction=>0);
$Ticket->_Set(Field => 'Status', Value => 'resolved', RecordTransaction => 0);

The 2 lines at the end of the cleanup code could also be:
    $Ticket->SetOwner($CreatorId);
    $Ticket->SetStatus('resolved');
but I use _Set instead because I don't want to fire off any more transactions when I resolve tickets this way.

Regards,
Gene

At 08:48 AM 11/26/2007, Mark Fuller wrote:
I am interested in that script

Mark Fuller

BandTel Engineering

603-528-6538 Option 2

603-528-6937 FAX

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gene LeDuc
Sent: Monday, November 26, 2007 11:29 AM
To: Asrai khn
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] take and resolve actions via email


Hi Askar,

This doesn't answer your question about special features, but it does tell
you a way to do what you want to do.

I resolve tickets via e-mail using 3.6.3 with a fairly simple scrip.  When
someone opens a ticket, I send out 2 e-mails.  The first goes to the user
who opened it - they get login credentials so they can look at the
ticket.  The second goes to the AdminCc list for the queue to notify them
that there's a new ticket in the queue.  If a reply comes in for that
ticket, and the sender is one of the AdminCc, and the first line of the
e-mail is "Ok", then my scrip sets the ticket owner to the person who sent
the message and the status to resolved.  Otherwise the message just gets
attached to the ticket.  It would be simple to modify a scrip like that to
do a "take" as well.

If you're interested in following this trail, let me know.

Regards,
Gene

At 06:55 AM 11/22/2007, Asrai khn wrote:
>while reading RT3 FAQs found that ...
>
>A2: RT 3.5 has support for take and resolve actions in rt-mailgate
>script, you can use them, but you should enable them in config.
>
>Wondering what to change in RT_SiteConfig.pm and can someone give me an
>examples of how to 'take' 'resolve' tickets via email, I know how to
>open new tickets in specific queue using mail.
>
>Thanks. Askar


--
Gene LeDuc, GSEC
Security Analyst
San Diego State University
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch today. Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com

Reply via email to