[rt-users] custom scrips?

Anne Ramey anner at blast.com
Fri Jul 29 15:07:21 EDT 2005


Malcolm Herbert wrote:
> I've been having a look through the contributions section in the wiki
> but I'm having trouble getting some custom scrips to work in the way
> that I'm after.
> 
> I'd like to have all new tickets owned by a particular user and I found
> that AutoSetOwner almost does what I want, but sets the owner to the
> requestor when a ticket is created via email. I am looking for some way
> to change:
> 
>   my $Actor = $self->TransactionObj->Creator;
> 
> to be able to specify my user id by name - numerically it's 22 in the
> database backend, but I'd rather put the username in the code than some
> arbitrary magic number ... it works, but it's not particularly pretty.
> 
I have one that does something like that.  This is the part that sets 
the actor.  I specify it by an email addr.

# get actor ID
my $User = new RT::User($RT::SystemUser);
# Put the email address of the user who needs to own tickets in this 
queue in here!
$User->LoadByEmail("myuser\@blast.com");
my $Actor = $User->id;

Anne



More information about the rt-users mailing list