%# No one can make you feel inferior without your consent. %# -- Eleanor Roosevelt <& /Edit/Elements/PickUserPopup, %ARGS &> <%INIT> if ($ARGS{'Action-Commit'}) { my $Groups = RT::Groups->new($session{'CurrentUser'}); $Groups->LimitToPersonalGroupsFor($CurrentUser); $Groups->{find_disabled_rows}++; my $Delegates; while ( my $Group = $Groups->Next) { $Delegates->{$Group->Name} = $Group; } my $Group = $Delegates->{$Queue}; if (!$User) { $Group->Delete if $Group; $m->print("
"); $m->abort; } if (!$Group) { $Group = RT::Group->new($session{'CurrentUser'}); $Group->CreatePersonalGroup( Name => $Queue, PrincipalId => $CurrentUser, ); $Delegates->{$Queue} = $Group; } $Group->SetDescription($User); foreach my $User (@{$Group->UserMembersObj->ItemsArrayRef}) { $Group->DeleteMember($User->PrincipalId); } $Group->AddMember($User); $m->print("
"); $m->abort; } <%ARGS> $User => 0 $IsWork => 0 $Queue => '' $Group => 0 $Job => 0 $CurrentUser => $session{'CurrentUser'}->UserObj->PrincipalId