[rt-users] Scrip not working
Stewart Tranter
S.G.Tranter at lboro.ac.uk
Wed Feb 1 07:09:36 EST 2006
Hi,
I have written a scrip that on queue change, will change the due date to
two days from now, but when I move a ticket from one queue to another,
nothing seems to happen. My scrip is:
Condition: On Queue Change
Action: User defined
Template: Global template: Blank
Stage: TransactionCreate
Custom condition:
Custom action preparation code: return(1);
Custom action cleanup code:
my $today = RT::Date->new($self->TicketObj->CurrentUser());
$today->SetToNow();
my $whichq = $self->TicketObj->Queue();
my $queue = new RT::Queue($RT::SystemUser);
$queue->Load($whichq);
my $daysuntildue = $queue->DefaultDueIn();
$today->AddDays($daysuntildue);
$self->TicketObj->SetDueDate($today->ISO);
return(1);
Can anyone see what's wrong? I'll be submitting this to the Wiki when
it works!
TIA,
Stewart
------------------------------------------------
Stewart Tranter
Computing Services
Loughborough University
E: s.g.tranter at lboro.ac.uk
W: http://www.lboro.ac.uk/computing/
T: +44 (0) 1509 223719
F: +44 (0) 1509 223989
------------------------------------------------
More information about the rt-users
mailing list