[rt-users] New Ticket In Queue Alerts

John McCoy jmccoy at ggu.edu
Wed Aug 30 13:07:02 EDT 2006


I took this one step further and checked to make sure no owner had been 
defined first so new condition of:

[root at tickets ~]# cat /opt/rt3/local/lib/RT/Condition/NewNoOwner.pm
# Test to see if incoming tickets have no owner set
# By jmccoy on and around July 2006
package RT::Condition::NewNoOwner;


# Bring in setting from RT::Condition::Generic
require RT::Condition::Generic;
use strict;
use vars qw/@ISA/;
@ISA = qw(RT::Condition::Generic);

sub IsApplicable {
  my $self = shift;
  #$RT::Logger->debug('Testing owner on ticket of '. 
$self->TicketObj->Subject .'with owner of '.$self->TicketObj->Owner);
  # Nobody is ID 10 on our system
  return 0 unless $self->TicketObj->Owner =~ /^10$/i;
  $RT::Logger->debug('Detected Ticket with no owner notifing group');
  return 1;
}

eval "require RT::Condition::NewNoOwner_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/NewNoOwner_Vendor.pm});
eval "require RT::Condition::NewNoOwner_Local";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/NewNoOwner_Local.pm});

1;

Action: Notify Other Recipients

Template: (Note: you could add code to extract members of the queue but 
I set up aliases for finer control)
From: tickets at tickets.ggu.edu
To: admin at ggu.edu
Subject: New Ticket in Infra Queue: {$Ticket->Subject}


There is a new ticket that needs attention:

{ $RT::WebURL }Ticket/Display.html?id={ $Ticket->Id }

Original Email Contents:

{ $Transaction->Content() }


Stage: TransactionCreate



Chris Allermann wrote:
> First of all I am rather new to RT, so please forgive me if this is a 
> stupid question. I've been searching the wiki and experimenting with 
> my install for a couple hours now and have not come up with a working 
> solution yet.
>
> My Goal:
> I want to set up a queue that will create new tickets via e-mail and 
> reply to the requestor with an auto-responder (I have this part 
> already working).  I have created a TechSupport group and added 
> several members to it, these users have full access to the queue.  
> What I would like to do next is when a new ticket is created is to 
> send out a generic "There is a new ticket" e-mail alert to all members 
> of the TechSupport group.
>
> It seems like it should be a rather straight-forward thing but I can't 
> seem to get it to work.  I'd appreciate if anybody can point me in the 
> right direction.  Thanks.
>
>
>
> --Chris
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
>

-- 
*************************************
John McCoy, Jr
Sr. Systems and Network Administrator
Enterprise Technology Services
Golden Gate University
415-442-6560
*************************************




More information about the rt-users mailing list