[rt-users] Aborting a scrip for a specific queue
Ruslan U. Zakirov
Ruslan.Zakirov at acronis.com
Thu Nov 4 06:52:25 EST 2004
Dave Rolsky wrote:
> I'd like to _not_ send emails for certain scrips for one queue in a
> system. Specifically, we're using it to handle bounces & postmaster
> emails, and I don't want that queue to send mail to the requestors.
>
> Ideally, I'd just weak the global scrips to do this rather than
> recreating the "on resolve" scrip for each of the other queues.
>
> I tried doing this with some custom prep code in the "on resolve" scrip
> like this:
>
> die "no email" if $self->TicketObj->QueueObj->Name eq 'Bounces';
> return 1;
>
> I also tried just returning 0. Neither one of those seemed to do
> anything. Is what I'm trying to do possible?
Yes, but you should change condition/action to "User defined" if you
want to enable custom code blocks. RT can't stack conditions/actions.
On resolve condition equivalent:
return 0 unless lc $self->TransactionObj->Type eq 'status';
return 0 unless lc $self->TransactionObj->NewValue eq 'resolved';
# you can put your additional condition here
return 1;
Best regards. Ruslan.
PS: In RT-3.3.x you can disable scrips with checkboxes :)
>
>
> -dave
>
> /*===========================
> VegGuide.Org
> Your guide to all that's veg.
> ===========================*/
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT wiki at http://wiki.bestpractical.com
More information about the rt-users
mailing list