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);
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'},
<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>