[bugzilla-gnome-org-customizations] [Patchreport] Show author and size of patches
- From: Andre Klapper <aklapper src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-customizations] [Patchreport] Show author and size of patches
- Date: Sat, 24 Jan 2015 18:11:14 +0000 (UTC)
commit 364d9216c8698d7ec75f70fd9e6985736884fdce
Author: Andre Klapper <a9016009 gmx de>
Date: Sat Jan 17 23:46:20 2015 +0100
[Patchreport] Show author and size of patches
Bug #675822
extensions/PatchReport/lib/Util.pm | 14 +++++++++++---
.../en/default/pages/patchreport.html.tmpl | 3 ++-
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/extensions/PatchReport/lib/Util.pm b/extensions/PatchReport/lib/Util.pm
index 33a5be0..0aa3a01 100644
--- a/extensions/PatchReport/lib/Util.pm
+++ b/extensions/PatchReport/lib/Util.pm
@@ -128,14 +128,20 @@ sub get_unreviewed_patches_and_stats {
(" . $dbh->sql_to_days('LOCALTIMESTAMP(0)') . "-" .
$dbh->sql_to_days('attachments.creation_ts') . ") AS age,
substring(attachments.description, 1, 70),
- products.name AS product, components.name AS component
+ products.name AS product, components.name AS component,
+ LENGTH(attach_data.thedata) AS datasize,
+ profiles.login_name AS author
FROM attachments
+ INNER JOIN attach_data
+ ON attachments.attach_id = attach_data.id
INNER JOIN bugs
ON attachments.bug_id = bugs.bug_id
INNER JOIN products
ON bugs.product_id = products.id
INNER JOIN components
ON bugs.component_id = components.id
+ INNER JOIN profiles
+ ON attachments.submitter_id = profiles.userid
WHERE attachments.ispatch = '1'";
if ($quoted_product && $quoted_product ne "'%'") {
@@ -188,7 +194,7 @@ sub get_unreviewed_patches_and_stats {
};
$prod_list = $stats->{product_list};
- while (my ($attach_id, $bug_id, $age, $desc, $prod, $comp) = $sth->fetchrow_array) {
+ while (my ($attach_id, $bug_id, $age, $desc, $prod, $comp, $datasize, $author) = $sth->fetchrow_array) {
# Check if we've moved on to a new product
if ($cur_product ne $prod) {
@@ -248,7 +254,9 @@ sub get_unreviewed_patches_and_stats {
my $new_patch = {
'id' => $attach_id,
'age' => $age,
- 'description' => $desc
+ 'description' => $desc,
+ 'datasize' => $datasize,
+ 'author' => $author
};
push @{$patch_list}, $new_patch;
diff --git a/extensions/PatchReport/template/en/default/pages/patchreport.html.tmpl
b/extensions/PatchReport/template/en/default/pages/patchreport.html.tmpl
index 5aacb38..044ea20 100644
--- a/extensions/PatchReport/template/en/default/pages/patchreport.html.tmpl
+++ b/extensions/PatchReport/template/en/default/pages/patchreport.html.tmpl
@@ -42,9 +42,10 @@
<ul>
[% FOREACH patch = bug.patch_list %]
- <li><i>Attachment [% patch.id FILTER html %]</i> ([% patch.age FILTER html %] days)
+ <li><i>[% patch.age FILTER html %] days old, [% patch.datasize FILTER unitconvert %]:</i>
<a href="attachment.cgi?id=[% patch.id FILTER uri %]&action=diff">
[% patch.description FILTER html %]</a>
+ <i>by [% patch.author FILTER email FILTER html %]</i>
</li>
[% END %]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]