[rt-users] Don't close tickets (or re-open) if a specific custom field is not a specific value

Christian Loos cloos at netcologne.de
Thu Oct 25 04:23:41 EDT 2012

Am 24.10.2012 16:15, schrieb Holger Haase:
> Hi all,
> I searched (Google/wiki/nabble/...) and tried for several hours now. Nothing worked.
> I have to make sure tha a ticket can only be closed if a custom field (or maybe transaction custom field) has a specific value.
> I have more than one queue and this should not happen globaly but in several queues.
> Is there any way to do this?
> Thank you so much for your help in advance,
> Holger
> --------
> Final RT training for 2012 in Atlanta, GA - October 23 & 24
>   http://bestpractical.com/training
> We're hiring! http://bestpractical.com/jobs
Hi Holger,

You can use a global scrip with an queue filter like this (scrip not

Condition: On Resolve
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

Custom action preparation code:

my @queue_list = qw(Queue1 Queue2);
my $ticket = $self->TicketObj;
my $queue = $ticket->QueueObj;
my $queue_name = $queue->Name;
return 0 unless grep /$queue_name/, @queue_list ;
return 0 if $ticket->FirstCustomFieldValue('YourCfName');
return 1;

Custom action cleanup code:

return 1;


More information about the rt-users mailing list