[rt-users] Don't close tickets (or re-open) if a specific custom field is not a specific value
Loos, Christian
CLoos at netcologne.de
Thu Oct 25 06:00:35 EDT 2012
Hi Holger,
your Custom action preparation code must look like this:
my @queue_list = qw(second_level);
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('AssetTag');
return 1;
This *must* be an global script. It only runs if the ticket queue is in
the @queue_list array.
Chris
Christian Loos
Network Documentation & Fibre Management
_________________________________________________________________________
NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9 | 50829 Köln
Tel: 0221 2222-276 | Fax: 0221 2222-7276 | Mobil: 0177 8888276
www.netcologne.de
Geschäftsführer:
Dr. Hans Konle (Sprecher)
Dipl.-Ing. Karl-Heinz Zankel
Vorsitzender des Aufsichtsrates:
Dr. Andreas Cerbe
HRB 25580, AG Köln
Diese Nachricht (inklusive aller Anhänge) ist vertraulich. Sollten Sie diese Nachricht versehentlich erhalten haben, bitten wir, den Absender (durch Antwort-E-Mail) hiervon unverzüglich zu informieren und die Nachricht zu löschen. Die E-Mail darf in diesem Fall weder vervielfältigt noch in anderer Weise verwendet werden.
-----Ursprüngliche Nachricht-----
Von: Holger Haase [mailto:holger.haase at stepstone.de]
Gesendet: Donnerstag, 25. Oktober 2012 11:21
An: Loos, Christian
Betreff: AW: Don't close tickets (or re-open) if a specific custom field is not a specific value
Hi Christian,
Many thanks for your fast answer!
It must be a global scrip?
So if the queue where it should happen is named "second_level" it should look like this, right?
_______________________________________________________
Condition: On Resolve
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate
Custom action preparation code:
my @queue_list = qw(first level second_level third_level);
my $ticket = $self->TicketObj;
my $queue = $ticket->QueueObj;
my $queue_name = $queue->Name;
return 0 unless grep /$second_level/, @queue_list ; return 0 if $ticket->FirstCustomFieldValue('AssetTag');
return 1;
Custom action cleanup code:
$self->TicketObj->SetStatus('re-opened');
return 1;
Thanks/Danke
Holger
More information about the rt-users
mailing list