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

2012-10-25 Thread Christian Loos
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
tested):

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:

$self-TicketObj-SetStatus('open');
return 1;


Chris


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


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

2012-10-25 Thread Jack Zabolotnyi
Or you can use html callbacks to dismiss changes before sending them to
scrips - just after user click Submit - you can check CF value and in
case of error trigger Abort(Error message). This will show notification
to client that his changes were discarded.

On Wed, Oct 24, 2012 at 4:15 PM, Holger Haase holger.ha...@stepstone.dewrote:

 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




-- 
Jack Zabolotnyi
Arces Network, LLC

e: jzabolot...@arces.net
w: http://www.arces.net

PGP key: 2048R/7F2AB658 2012-07-02
PGP fingerprint: 4C7E 00A8 5210 F3D9 0509  C70E 87C8 666E 7F2A B658


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


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

2012-10-25 Thread Holger Haase
Great, this did the trick! Many thanks to Christian Loos! 

Best regards,
Holger

-Ursprüngliche Nachricht-
Von: Loos, Christian [mailto:cl...@netcologne.de] 
Gesendet: Donnerstag, 25. Oktober 2012 12:01
An: Holger Haase
Cc: rt-users@lists.bestpractical.com
Betreff: AW: Don't close tickets (or re-open) if a specific custom field is not 
a specific value

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 -276 | Fax: 0221 -7276 | Mobil: 0177 276

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.ha...@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


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


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

2012-10-24 Thread 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