[rt-users] Scrip for changing ownership on a case.

Bjørn Skovlund Rydén bjorn at 247ms.com
Tue Aug 23 05:45:14 EDT 2005


> -----Original Message-----

> I want our customers to be able to own cases, in which we 
> need a response from them. I have tried to do this by keeping 
> them "Unprivileged" and giving them the "Own Ticket" ACL.
> 
> Now, I don't want customers to be able to Modify the ticket, 
> as they shouldn't be able to assign it to anyone or change it's queue.
> 
> So in order for a customer to be able to return a ticket to 
> us once he has replied, I was thinking of running a scrip to do it.
> 
> The scrip doesn't seem to work for various reasons though. 
> The user doesn't have the right to make the change to Nobody, 
> and I think I messed a few other things up too.
> 
> Can somebody help me with this? Or maybe somebody been in the 
> same situation and solved it differently?

After alot of fiddling and found some old maillist-posts, I ended up with this piece of code, if anyone else can use it:
 my $Actor = $self->TransactionObj->Creator;
 my $Owner = $self->TicketObj->OwnerObj->Id;
 return 1 unless $Actor == $Owner;
 return 1 if $self->TransactionObj->CreatorObj->Privileged;
 $self->TicketObj->_Set(Field => 'Owner', Value => $RT::Nobody->id);
 return 1;

I put it in the wiki too..


Cheers, Bjorn



More information about the rt-users mailing list