[rt-users] RT 3.4.0 -- 2 Nobody

Jesse Vincent jesse at bestpractical.com
Thu Feb 3 11:42:41 EST 2005


Having looked deeper into this, the problem results from an extra
efficiency we added just before the release of 3.4.0. It's merely a
cosmetic issue and not evidence of a deep bug. Try out the attached
patch. If it works, that'll be in 3.4.1.

	Jesse


-------------- next part --------------
=== html/Elements/SelectOwner
==================================================================
--- html/Elements/SelectOwner  (revision 4008)
+++ html/Elements/SelectOwner  (local)
@@ -47,12 +47,10 @@
 %if ($DefaultValue) {
 <OPTION <% !$Default && "SELECTED" %> VALUE=""><%$DefaultLabel%></OPTION>
 %}
-<OPTION <% ($RT::Nobody->Id() == $Default) && "SELECTED" %> VALUE="<%$RT::Nobody->Id%>"><%$RT::Nobody->Name%></OPTION>
 %foreach my $User ( @users)  {
 <OPTION <% ($User->Id == $Default)         && "SELECTED" %> VALUE="<%$User->Id()%>"><%$User->Name()%></OPTION>
 %}
 </SELECT>
-
 <%INIT>
 my @objects;
 my @users;
@@ -73,14 +71,22 @@
 }
 
 my %user_uniq_hash;
+
+
 foreach my $object (@objects) {
 	my $Users = RT::Users->new($session{CurrentUser});
         $Users->WhoHaveRight(Right => 'OwnTicket', Object => $object, IncludeSystemRights => 1, IncludeSuperusers => 0); 
         while (my $User = $Users->Next()) {
+                next if ($User->id == $RT::Nobody->id); # skip nobody here, so we can make them first later
 	      $user_uniq_hash{$User->Id()} = $User;
         }
 }
+
 @users = sort { uc($a->Name) cmp uc($b->Name) } values %user_uniq_hash; 
+unshift(@users, $RT::Nobody);
+
+
+
 </%INIT>
 
 <%ARGS>


More information about the rt-users mailing list