[rt-devel] Error changing ticket owner
Matthew J. Draper
matthewd at staff.airnet.com.au
Thu Mar 27 18:55:43 EST 2003
Changing a ticket owner, I got an error... 'Unable to add user to
group', or something like that, I believe.
Anyway, I went to change it again, and got an exception: something to
the effect of "Unable to call Delete() on undefined value". In order to
successfully change the owner, I had to make the following change to
RT/lib/Ticket_Overlay.pm, and thought it might be a useful... Assuming I
haven't broken anything. :)
3027,3031c3027,3033
< my ($del_id, $del_msg) =
$self->OwnerGroup->MembersObj->First->Delete();
< unless ($del_id) {
< $RT::Handle->Rollback();
< return(0, $self->loc("Could not change owner. "). $del_msg);
< }
---
> if ( $self->OwnerGroup->MembersObj->First ) {
> my ($del_id, $del_msg) =
$self->OwnerGroup->MembersObj->First->Delete();
> unless ($del_id) {
> $RT::Handle->Rollback();
> return(0, $self->loc("Could not change owner. ").
$del_msg);
> }
> }
Matthew
More information about the Rt-devel
mailing list