[rt-users] Prevent outgoing E-Mail when Ticket is resolved

Drew Barnes barnesaw at ucrwcu.rwc.uc.edu
Tue Jul 3 08:19:39 EDT 2007


On RT 3.2.3, I used this scrip to notify only on the first resolve.  I
got this off the (old) wiki, so I'm not sure where it may be now.  You
may need to modify this for new versions.

Condition: OnResolve
Action: Notify Requestors
Template: Global Template:Resolved
Stage: TransactionCreate
Custom Condition:
# OnResolve Once
# This scrip condition matches only if the current transaction is
# "resolved" and the current ticket has no other resolved transactions.
#
# First, check if the current transaction is "resolved".  If so, get
# the list of transactions associated with the current ticket and go
# through them one by one.  If the ticket number in the transaction
# matches the current ticket (i.e., this isn't a transaction from a
# merged ticket) and the transaction is "resolved", count it.  When
# we are all done, return true if we only found 1 resolved transaction
# (i.e., the current one) and false otherwise.

my $result = undef;

if ($self->TransactionObj->Type eq "Status" &&
    $self->TransactionObj->NewValue eq "resolved")
{
    my $trans_list = $self->TicketObj->Transactions;
    my $trans;
    my $num_resolved = 0;

    while ($trans = $trans_list->Next)
    {
        $num_resolved++ if ($trans->Ticket == $self->TicketObj->Id) &&
                           ($trans->Type eq "Status") &&
                           ($trans->NewValue eq "resolved");
    }
    $result = ($num_resolved <= 1);
}

return($result);



Wendler, Jürgen wrote:
> Hi Folks,
>
> I got a little question, which is hard to solve for me, so i'm askind here again.
>
> Is there any possibility to prevent this outgoing E-Mail when a Ticket is resolved?
> I know that there are scrips but my Problem is in some cases when i solve the Problem, i close the Ticket. The Requestor gets an E-Mail that the Ticket is resolved. Sometimes the Requestor replys to this E-Mail with a Thanks for good work etc. and the Ticket is reopened.
>
> I'm actually thinking of a second resolve Button, one with outgoing E-Mail when i resolve, and one without this Notification E-Mail.
>
> Anyone got a clue of how to do that?
>
> Thx in advise...
>
> Jürgen Wendler
>
> _______________________________________________
> 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
>   

-- 
Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati




More information about the rt-users mailing list