You need condition as well. Also adding space as value is not a good option, use DeleteCustomFieldValue method.
On Tue, Jul 14, 2009 at 5:59 AM, Carlos A. Alvarez<carlos.alva...@commxinc.com> wrote: > > > I will like to create a scrip where the status of a ticket is automatically > changed from open to stalled when a Owner replies to a requestor. I am using > rt-crontool to monitor the status of the tickets and auto resolve the ticket > after 72 hours of inactivity. I created a custom field to monitor the > status of the crontool, but my problem is that when the customer replies, I > can’t rely on my techs to change the status of the ticket manually. > > > > I tried creating User Defined Scrip which works fine, exept it executes each > time, indiscriminately. Let me try to explain, I have one script that > changes the status from open to stalled, when a technician replies, and > another that changed the status back to open when the customer/requestor > replies. I can see that both scrips are executing at the same time > regardless of who initiated the correspondence. > > > > I know that I am missing something basic, but I don’t know what. Can anyone > help. > > > > Scrip 1 customer reply > > $self->TicketObj->AddCustomFieldValue(Field => 'Support Status', Value => ' > '); > > $self->TicketObj->AddCustomFieldValue(Field => 'AutoClosure', Value => ' '); > > $self->TicketObj->SetStatus("open"); > > return 1; > > > > Scrip 2 Owner reply > > $self->TicketObj->AddCustomFieldValue(Field => 'Support Status', Value => > 'Awaiting Customer'); > > $self->TicketObj->SetStatus("stalled"); > > return 1; > > > > Thanks… > > _______________________________________________ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: sa...@bestpractical.com > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com > -- Best regards, Ruslan. _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com