[tools] testbot/web: Remove the duplicate Author column on the main page.

Francois Gouget fgouget at codeweavers.com
Fri Jun 10 10:41:15 CDT 2022


Use the job's UserName field instead of looking up the (Itemref) user
object for every job.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/web/index.pl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testbot/web/index.pl b/testbot/web/index.pl
index 8b4af53c0..2073b1e6f 100644
--- a/testbot/web/index.pl
+++ b/testbot/web/index.pl
@@ -39,7 +39,7 @@ sub DisplayProperty($$)
   my ($self, $PropertyDescriptor) = @_;
 
   my $PropertyName = $PropertyDescriptor->GetName();
-  return $PropertyName =~ /^(?:Branch|PatchId|Patch)$/ ? "" :
+  return $PropertyName =~ /^(?:Branch|User|PatchId|Patch)$/ ? "" :
          $PropertyName eq "Submitted" ? ("ro", "timetipdate") :
          ($PropertyName eq "Branch" and !CreateBranches()->MultipleBranchesPresent) ? "" :
          $self->SUPER::DisplayProperty($PropertyDescriptor);
@@ -74,16 +74,16 @@ sub GenerateDataView($$$)
 
   my $Job = $Row->{Item};
   my $PropertyName = $Col->{Descriptor}->GetName();
-  if ($PropertyName eq "User")
+  if ($PropertyName eq "UserName")
   {
-    if (defined $Job->Patch and defined $Job->Patch->FromName and
-        $Job->User->GetKey() eq GetBatchUser()->GetKey())
+    if (defined $Job->PatchId and defined $Job->Patch->FromName and
+        $Job->UserName eq GetBatchUser()->Name)
     {
       print $self->escapeHTML($Job->Patch->FromName);
     }
     else
     {
-      print $self->escapeHTML($Job->User->Name);
+      print $self->escapeHTML($Job->UserName);
     }
   }
   elsif ($PropertyName eq "Status")
-- 
2.30.2



More information about the wine-devel mailing list