<div><font size="2" face="Arial"><span class="888480416-29082011">Hi
All,</span></font></div>
<div><font size="2" face="Arial"><span class="888480416-29082011"></span></font> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">I am trying to get
our old RT (3.4.5) to resolve tickets when a user replies, but am having some
issues.</span></font></div>
<div><font size="2" face="Arial"><span class="888480416-29082011"></span></font> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">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. </span></font></div>
<div><font size="2" face="Arial"><span class="888480416-29082011"></span></font> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">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: /<u><font color="#0000ff">resolveuseremail</font></u>\@<a href="http://domain.com/g">domain.com/g</a></span></font></div>
<div><font size="2" face="Arial"><span class="888480416-29082011"></span></font> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">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.</span></font></div>
<div><font size="2" face="Arial"><span class="888480416-29082011"></span></font> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">Thanks,</span></font></div>
<div><font size="2" face="Arial"><span class="888480416-29082011"></span></font> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">Kevin</span></font></div>
<div><font size="2" face="Arial"><span class="888480416-29082011">-----------------------------</span></font></div>
<div><font size="2" face="Arial"><span class="888480416-29082011"></span></font> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">my $notnagios_desc =
undef;<br>my $same_desc = undef;<br>my $Transaction =
$self->TransactionObj;<br>my $subject =
$Transaction->Attachments->First->GetHeader('Subject');<br>my $val =
($self->TicketObj->Requestors->MemberEmailAddressesAsString);</span></font></div>
<div> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">if (($subject =~
m/^RE:/i) || ( $subject =~ m/^FW:/i )) {<br>
$notnagios_desc=substr($subject,4);<br> if (($notnagios_desc =~ m/^FW:/i) ||
($notnagios_desc =~ m/^RE:/i )) {<br>
$notnagios_desc=substr($notnagios_desc,4); <br> if (($notnagios_desc =~
m/^FW:/i) || ($notnagios_desc =~ m/^RE:/i )) {<br>
$notnagios_desc=substr($notnagios_desc,4); <br> }<br> }<br>} else
{<br> $notnagios_desc=$subject;<br> }<br> <br># look for same subject on
existing tickets <br>my $search =
RT::Tickets->new($RT::SystemUser);<br>$search->LimitQueue(VALUE =>
'HelpDesk');<br>$search->LimitStatus(VALUE => 'new', OPERATOR => '=',
ENTRYAGGREGATOR => 'or');<br>$search->LimitStatus(VALUE => 'open',
OPERATOR => '=');</span></font></div>
<div> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">if
($search->Count == 0) { return 1; }<br>my $id = undef;<br>while (my $ticket =
$search->Next) {<br> # Ignore this ticket that opened this transaction <br>
next if $self->TicketObj->Id == $ticket->Id;<br>
$same_desc=$ticket->Subject; <br> if (($same_desc =~ m/^FW:/i) ||
($same_desc =~ m/^RE:/i )) {<br> $same_desc=substr($same_desc,4);
<br> if (($same_desc =~ m/^FW:/i) || ($same_desc =~ m/^RE:/i ))
{<br> $same_desc=substr($same_desc,4); <br> if (($same_desc =~
m/^FW:/i) || ($same_desc =~ m/^RE:/i )) {<br>
$same_desc=substr($same_desc,4); <br> }<br> }<br> } <br>
<br> if ($notnagios_desc eq $same_desc) {<br> # Found the same subject
<br> $id = $ticket->Id;<br>
$self->TicketObj->MergeInto($id);<br> }<br> }</span></font></div>
<div> </div>
<div><font size="2" face="Arial"><span class="888480416-29082011">if ($val == <a title="blocked::mailto:'resolveuseremail@domain.com'" href="mailto:%27resolveuseremail@domain.com%27">'resolveuseremail@domain.com'</a>)
{<br>## Set Set owner to e-mail sender, status to 'resolved'<br>my $Ticket =
$self->TicketObj;<br>my $Transaction = $self->TransactionObj;<br>my
$CreatorId =
$Transaction->CreatorObj->Id;<br>$Ticket->SetOwner($CreatorId);<br>$Ticket->SetStatus('resolved');
<br>}<br> <br>$id || return 1;<br>1;</span></font></div>