Well, with the help of the book and the wiki, I have the code to
change the user back to nobody on a reopened ticket at least trying to
do what it's supposed to. Unfortunately, it got the following error:
[Mon Jan 21 05:38:47 2008] [error]: Failed changing owner to Nobody on
ticket reopen: You can only reassign tickets that you own or that are
unowned ((eval 831):10)
is there some way to force the scrip to reassign the ticket by acting
as a user with more controls?
Steve
On Jan 21, 2008, at 12:03 AM, Steve Cochran wrote:
I'm trying to write a scrip that runs on a status change. I'm trying
to change the owner to Nobody if a ticket is reopened, and I have
the following code in the action prep area:
my $oldStatus = $self->TransactionObj->OldValue;
my $newStatus = $self->TicketObj->status;
if (($oldStatus eq 'resolved') and ($newStatus eq 'open') {
$self->TicketObj->OwnerObj = RT::Nobody()->id();
}
I've run a couple tests through, but nothing seems to be happening.
First, what's the best way to debug custom action code? Second, if
anyone seems what I'm doing wrong, feel free to point it out.
Steve
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly
Media.Buy a copy at http://rtbook.bestpractical.com
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com