[rt-users] Resolve when ticket is from a certain email address

Kevin Fox root.kev at gmail.com
Mon Aug 29 12:28:28 EDT 2011

Hi All,

I am trying to get our old RT (3.4.5) to resolve tickets when a user
replies, but am having some issues.

The basic setup is this: external user emails to the help desk email which
sends it to the helpdesk queue email and to a single customer facing user.
That user refuses to user RT, so when he replies to the email he does a
reply all (to both the customer and RT).  RT is setup to merge tickets with
similar names (RE:/FW:) so his response is merged to the original ticket,
but when I attempt to get a scrip to resolve the ticket when the email is
from this user it doesn't work as I want.  Currently it will resolve the
ticket, no matter who replys, which is definitely a no-no.

I figure that the issue is my comparison of the $val to the email address.
I had this as well and it didn't work either: /*resolveuseremail*\@

If someone could help me out I would greatly appreciate it.  Below is the
scrip as it currently sits, except for the time being the resolve by user
part is commented out.



my $notnagios_desc = undef;
my $same_desc = undef;
my $Transaction = $self->TransactionObj;
my $subject = $Transaction->Attachments->First->GetHeader('Subject');
my $val = ($self->TicketObj->Requestors->MemberEmailAddressesAsString);

if (($subject =~ m/^RE:/i) || ( $subject =~ m/^FW:/i )) {
    if (($notnagios_desc =~ m/^FW:/i) || ($notnagios_desc =~ m/^RE:/i )) {
          if (($notnagios_desc =~ m/^FW:/i) || ($notnagios_desc =~ m/^RE:/i
)) {
} else {

# look for same subject on existing tickets
my $search = RT::Tickets->new($RT::SystemUser);
$search->LimitQueue(VALUE => 'HelpDesk');
$search->LimitStatus(VALUE => 'new', OPERATOR => '=', ENTRYAGGREGATOR =>
$search->LimitStatus(VALUE => 'open', OPERATOR => '=');

if ($search->Count == 0) { return 1; }
my $id = undef;
while (my $ticket = $search->Next) {
 # Ignore this ticket that opened this transaction
   next if $self->TicketObj->Id == $ticket->Id;
    if (($same_desc =~ m/^FW:/i) || ($same_desc =~ m/^RE:/i )) {
      if (($same_desc =~ m/^FW:/i) || ($same_desc =~ m/^RE:/i )) {
          if (($same_desc =~ m/^FW:/i) || ($same_desc =~ m/^RE:/i )) {

   if ($notnagios_desc eq $same_desc) {
        # Found the same subject
        $id = $ticket->Id;

if ($val == 'resolveuseremail at domain.com') {
## Set Set owner to e-mail sender, status to 'resolved'
my $Ticket = $self->TicketObj;
my $Transaction = $self->TransactionObj;
my $CreatorId = $Transaction->CreatorObj->Id;

$id || return 1;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110829/8f864aa7/attachment.htm>

More information about the rt-users mailing list