Aborting a scrip for a specific queue

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?

-dave

/===========================
VegGuide.Org
Your guide to all that’s veg.
===========================
/

Returning 0 when the queue name matches is exactly how I
disable a scrip for just one queue.

-ToddOn Wed, Nov 03, 2004 at 12:18:09PM -0600, 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?

-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

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 :slight_smile: