Error with ticket status change

Hi,

I have a problem when I want to change the ticket status from ‘open’ to
’resolve’.
The idea is:

1.-I create a ticket in a queue and his approval. The ticket status at
now is ‘pending of approval’.
2.-I accepted approval, so the ticket status change from ‘pending’ to
’open’.
3.-At this moment, when ticket status is ‘OPEN’, I want to automatically
switch to ‘SOLVED’

I have problems with STEP 3, because I create the next action and
DOESN’T work :frowning:
The action is:

Condition: 'When change the status’
Action: 'Notify the owner’
Template: 'Global template:Resolve’
Phase: Disabled

I suppose that ‘Global template:Resolve’ change the status of the ticket
when the ticket change the status.

Why don’t work? If it does not work with this configuration, there is
some simple way to switch to ‘solved’ when you change the ticket status?

THANKS!!:slight_smile:

Best regards!


/ / 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@cesca.cat

Phase: Disabled

Your scrip is disabled.

Best regards, Ruslan.

Phase: Disabled
Your scrip is disabled.

I put ‘TransactionCreate’ on the phase but the ticket status (not the
approval, the original) pass from ‘pending’ to ‘open’ but NO ‘open’ to
’resolve’. What i’m doing wrong?

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@cesca.cat

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.

Best regards, Ruslan.

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@cesca.cat

Hi,

WritingCustomActions on the wiki may give you point to start.On Wed, Dec 14, 2011 at 20:57, Daniel Garcia Mejia dgarcia@cesca.cat wrote:

On 14/12/11 15:31, Ruslan Zakirov wrote:

On Wed, Dec 14, 2011 at 17:43, Daniel Garcia Mejiadgarcia@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@cesca.cat


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Boston March 5 & 6, 2012

Best regards, Ruslan.