<div dir="ltr"><div>Sorry for all the messages today.<br><br></div>My boss just pointed out something odd: our script to make a ticket requestor into the owner works fine, in that viewing the ticket shows the owner. However, a search that turns up multiple tickets will have many owners listed as "nobody in particular". Clicking such a ticket reveals an owner, though. Why would the search sometimes refuse to show the owner, while the ticket page lists one? I haven't modified the results page at all, and while I did modify the ticket display some, I never touched the part that shows the owner. Here's the script (I didn't write it, I borrowed it):<br><br><br># get actor ID<br>my $Actor = $self->TransactionObj->Creator;<br>#if actor is RT_SystemUser then get out of here<br>return 1 if $Actor == $RT::SystemUser->id;<br>#prevents a ticket being assigned to an unprivileged user, comment out if you want this<br>return 1 unless $self->TransactionObj->CreatorObj->Privileged;<br>#get out unless ticket owner is nobody<br>return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;<br>#try to change owner<br>$RT::Logger->info("Auto assign ticket #". $self->TicketObj->id ." to user #". $Actor );<br>my ($status, $msg) = $self->TicketObj->_Set(Field => 'Owner', Value => $Actor, RecordTransaction => 0);<br>unless( $status ) {<br>    $RT::Logger->error( "Impossible to assign the ticket to $Actor: $msg" );<br>    return undef;<br>}<br><br>return 1;<br clear="all"><div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div>Alex Hall<br></div>Automatic Distributors, IT department<br></div><a href="mailto:ahall@autodist.com" target="_blank">ahall@autodist.com</a><br></div></div>
</div></div></div>