]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 297870: attachments table/list should show attachment creator
authorbugzilla%glob.com.au <>
Sun, 10 Jul 2005 20:34:32 +0000 (20:34 +0000)
committerbugzilla%glob.com.au <>
Sun, 10 Jul 2005 20:34:32 +0000 (20:34 +0000)
Patch by Byron Jones <bugzilla@glob.com.au> r=LpSolit,a=justdave

Bugzilla/Attachment.pm
template/en/default/attachment/list.html.tmpl

index 4d223d633880ceee11875e297a121e38fa17fcb2..10fa6ddfc2019f2444aeafddf63bdc4047e44664 100644 (file)
@@ -75,7 +75,8 @@ sub query
   my $list = $dbh->selectall_arrayref("SELECT attach_id, " .
                                       $dbh->sql_date_format('creation_ts', '%Y.%m.%d %H:%i') .
                                       ", mimetype, description, ispatch,
-                                      isobsolete, isprivate, LENGTH(thedata)
+                                      isobsolete, isprivate, LENGTH(thedata),
+                                      submitter_id
                                       FROM attachments
                                       WHERE bug_id = ? ORDER BY attach_id",
                                       undef, $bugid);
@@ -85,7 +86,9 @@ sub query
     my %a;
     ($a{'attachid'}, $a{'date'}, $a{'contenttype'},
      $a{'description'}, $a{'ispatch'}, $a{'isobsolete'},
-     $a{'isprivate'}, $a{'datasize'}) = @$row;
+     $a{'isprivate'}, $a{'datasize'}, $a{'submitter_id'}) = @$row;
+
+    $a{'submitter'} = new Bugzilla::User($a{'submitter_id'});
 
     # Retrieve a list of flags for this attachment.
     $a{'flags'} = Bugzilla::Flag::match({ 'attach_id' => $a{'attachid'},
index 8f6bbadb1dc4b08338f7ad1f285a641785496748..b632d42110bb29e4062e6a278d0cb4502e9b6fc3 100644 (file)
@@ -24,6 +24,7 @@
   <tr>
     <th bgcolor="#cccccc" align="left">Attachment</th>
     <th bgcolor="#cccccc" align="left">Type</th>
+    <th bgcolor="#cccccc" align="left">Creator</th>
     <th bgcolor="#cccccc" align="left">Created</th>
     <th bgcolor="#cccccc" align="left">Size</th>
     [% IF show_attachment_flags %]
           [% END %]
         </td>
 
+        <td valign="top">
+          <a href="mailto:[% attachment.submitter.email FILTER html %]">
+          [% attachment.submitter.name || attachment.submitter.login FILTER html %]
+          </a>
+        </td>
         <td valign="top">[% attachment.date FILTER time %]</td>
         <td valign="top">[% attachment.datasize FILTER unitconvert %]</td>