On 14/12/11 15:31, Ruslan Zakirov wrote:
On Wed, Dec 14, 2011 at 17:43, Daniel Garcia Mejia<dgar...@cesca.cat>  wrote:
I suppose that 'Global template:Resolve' change the status of the ticket
when the ticket change the status.
You suppose wrong. Templates don't and shouldn't change objects. It's
job for scrips' actions and you need one that changes status.

Ok, I understand you.
But I don't know where to start to program the script.
Know of any tutorial which explains it well? I have also the Book of RT. Besides, I think creating this script action will not be very hard not to? Would have the following structure?

Description: ResolveTicket

Condition: On Create
Custom condition:
Action: User Defined

Custom action preparation code: return 1;
Custom action cleanup code:

if ( $self->TicketObj->SetStatus( "open" )){
  $self->TicketObj->SetStatus( "resolved" );}
  return 1;

Template: Global template: Blank



THANKS!

--
.......................................................................
        __
       / /       Daniel García Mejía
 C E / S / C A   Portals i Repositoris
     /_/         Centre de Serveis Científics i Acadèmics de Catalunya

 Gran Capità, 2-4 (Edifici Nexus) - 08034 Barcelona
 T. (NULL) - F.  93 205 6979 - dgar...@cesca.cat
.......................................................................

--------
RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5 & 6, 2012

Reply via email to