Francois Gouget : testbot/web: Remove the duplicate Author column on the main page.

Alexandre Julliard julliard at winehq.org
Mon Jun 13 15:58:31 CDT 2022


Module: tools
Branch: master
Commit: 292ba034e3bc0b9ae95c7aa5932c7544aecc6d90
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=292ba034e3bc0b9ae95c7aa5932c7544aecc6d90

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Jun 10 17:41:15 2022 +0200

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

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 8b4af53..2073b1e 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")




More information about the wine-cvs mailing list