[rt-users] Error with ticket status change

Ruslan Zakirov ruz at bestpractical.com
Wed Dec 14 14:04:53 EST 2011


Hi,

WritingCustomActions on the wiki may give you point to start.

On Wed, Dec 14, 2011 at 20:57, Daniel Garcia Mejia <dgarcia at cesca.cat> wrote:
> On 14/12/11 15:31, Ruslan Zakirov wrote:
>>
>> On Wed, Dec 14, 2011 at 17:43, Daniel Garcia Mejia<dgarcia at 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 - dgarcia at cesca.cat
> .......................................................................
>
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Boston  March 5 & 6, 2012



-- 
Best regards, Ruslan.



More information about the rt-users mailing list