[rt-users] Scrip help to replace requestor upon create

James Price james at digitalciti.com
Mon Jun 18 15:06:04 EDT 2007

I am looking to do 1 of the following:
1. Have a scrip that removes the requestor on a specific queue if it matches
X, X of course being a specific email address.

2. A SQL query that will accomplish the above that I could run from a cron

I have a MySQL query I thought would work, essentially the following:
/usr/local/mysql/bin/mysql -u dbauname rt3 -e "update Tickets set
Creator='10' where Queue='7' and Creator='2653';"

This does update the creator of a given ticket that matches userid 2653 and
changes it to userid 10, which is the nobody user.  Even though this works,
I must be missing something because there are still tickets with requestors
of the userid 2653 on the ticket and not Nobody.

An easier and more efficient way of doing this would be on creation using a
scrip.  I have a scrip which works which upon creation sets the owner
automatically.  I'm sure its just a slight modification to that scrip, but I
just can't quite find the object information I need.

My Change Owner scrip contains the following:
Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

Custom Condition: is blank
Custom action preparation code: return 1;
Custom action cleanup code: 
my $newowner = "kera";
$self->TicketObj->SetOwner( $newowner );
return 1;

I'm sure if I knew the syntax to modify this to change the requestor on a
ticket, it'd be easier.  Essentially I want the requestor to be Nobody.


James R. Price
3636 S. Iron St., Chicago, IL 60609
Company Tel: 888.855.5550
My Tel/Fax/Cell: 800.603.0769
Web: www.digitalciti.com
Email: james at digitalciti.com

More information about the rt-users mailing list