[rt-users] Scrip help please.

Kenneth Crocker kfcrocker at lbl.gov
Wed Jun 2 20:06:54 EDT 2010


Paul,

I have some code that adds a CC to an individual ticket on a Queue basis.
So, if you want this for just certain types of tickets, maybe you could
modify it for those conditions and put it in the Queues relevant to that
need. OH, I also have some code that add's *additional* Cc's on
"Correspondence" with those tickets as well. Is that something you might be
interested in using?

Kenn
LBNL

On Wed, Jun 2, 2010 at 2:50 PM, Dougherty Paul <paul_dougherty at prn.com>wrote:

>  Hi,
>
>
>
> I am sure this is an id10t error, but I am trying to write a scrip that
> sends an adds a “CC” to a new ticket whose urgency is Critical (or
> critical). So far, the closest I have gotten is to have the system add the
> “CC”’s for every new ticket.
>
>
>
> Here is the custom condition that is giving me the fits. The current error
> I am receiving involves a syntax error…thing is, no matter what I try, I
> cannot get this thing to work. Every other part of this process works (ie,
> when the cc’s are added, the email is sent. The custom action does indeed
> add the cc’s).
>
>
>
> I just need to meet three conditions. One is on create, the other is
> Urgency (custom field) Critical or Urgency critical.
>
>
>
> Thanks,
>
>
> Paul
>
>
>
>
>
> Custom condition:
>
> if ( ($self->TransactionObj->Type eq "Create") &&
>
>                     ( ( $self->TicketObj->FirstCustomFieldValue('Urgency')
> eq "Critical") || ( $self->TicketObj->FirstCustomFieldValue('Urgency') eq
> "critical")))
>
> return 1;
>
> else
>
> return 0;
>
>
>
> Custom action: (runs fine):
>
> $self->TicketObj->AddWatcher( Type => "Cc",
>
>                               Email =>"xxx\@prn.com");
>
> $self->TicketObj->AddWatcher( Type => "Cc",
>
>                               Email =>"xxx\@prn.com");
>
> push( @{$self->{'To'}},
>
>       $self->TicketObj->Requestors->MemberEmailAddresses,
>
>       $self->TicketObj->QueueObj->Cc->MemberEmailAddresses );
>
> return 1;
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100602/189511af/attachment.htm>


More information about the rt-users mailing list