Prevent users from Assigning Owner during ticket create?

We have a workflow where our customers log in to RT and can create a new
ticket in the Helpdesk Queue. Unfortunately they are currently able to
assign an Owner during the Create process.

I have not been able to find a permission that limits or allows
assigning an owner, it seems to be granted along with the Create Ticket
right.

I have tried to write a scrip that will set the owner to Nobody, but I
get an error in the log stating that I can only assign tickets that have
no owner or are assigned to me.

Ideas?

Aaron Sallade’
Application Manager
PTSO of Washington
“Shared Technology for Community Health”
(206) 613-8938 Desk
(206) 521-8833 Main
(206) 613-5078 Fax
asallade@ptsowa.org

Aaron,

I reset the owner to "Nobody" when a ticket is moved to a new queue. 

Perhaps a little change to that will work for you. Here it is:

Condition: On Create
Action: User-defined
Template: Blank
Stage: TransactionBatch

Custom condition: none

Custom action preparation code:

return 1;

Custom action cleanup code:

set new Ticket Owner value

my $ticket = $self->TicketObj;

$ticket->SetOwner(10, ‘Force’);

return 1;

I hope this helps.

Kenn
LBNLOn 5/22/2008 10:48 AM, Aaron Sallade wrote:

We have a workflow where our customers log in to RT and can create a new
ticket in the Helpdesk Queue. Unfortunately they are currently able to
assign an Owner during the Create process.

I have not been able to find a permission that limits or allows
assigning an owner, it seems to be granted along with the Create Ticket
right.

I have tried to write a scrip that will set the owner to Nobody, but I
get an error in the log stating that I can only assign tickets that have
no owner or are assigned to me.

Ideas?

Aaron Sallade’
Application Manager
PTSO of Washington
//“Shared Technology for Community Health”///
/(206) 613-8938 Desk
(206) 521-8833 Main
(206) 613-5078 Fax
asallade@ptsowa.org mailto:asallade@ptsowa.org



The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Hi Aaron,

you can either force the Owner back to Nobody like Kenn did (this is
possible using OnCreate too) or even better, copy the
/opt/rt3/share/html/Ticket/Create.html to your local directory and
comment out the lines with the owner (I did this for us here and in some
other files to get rid of all the built-in fields we do not use), so
people won’t even see there’s a possibility to set an owner themselves:

Ben

Kenneth Crocker schrieb:

Just wanted to add a solution to this that I used. I wanted to force the owner to nobody when regular users submitted tickets, but did not want to set this same limitation for IT admin staff.

Here was my solution:

Custom scrip:

Condition: user defined
Action: user defined
Template: blank
Applies to: global

Custom condition: `return 0 unless $self->TransactionObj->Type eq “Create”;
my $in_group = ‘GROUPNAME’;

my $creator = $self->TicketObj->CreatorObj;
my $group = RT::Group->new( $self->CurrentUser );
$group->LoadUserDefinedGroup( $in_group );
return 0 if $group->HasMemberRecursively( $creator->id );

return 1;
return 1;`

Custom action preparation code: return 1;

Custom action commit code: `my $ticket = $self->TicketObj;

$ticket->SetOwner($RT::Nobody->Id);

return 1;`