summaryrefslogtreecommitdiffstats
path: root/extensions/BMO
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-02-07 08:29:29 +0100
committerByron Jones <bjones@mozilla.com>2012-02-07 08:29:29 +0100
commit8f46f1cc45215d0da05bdf548ce1c11902beead7 (patch)
tree59a098a00fc5bc42328f7317ac3921e349272b5e /extensions/BMO
parentf91cf1d2fcb5abe80d60b257d0bce6bc3dc2dd8d (diff)
downloadbugzilla-8f46f1cc45215d0da05bdf548ce1c11902beead7.tar.gz
bugzilla-8f46f1cc45215d0da05bdf548ce1c11902beead7.tar.xz
Bug 723512: add CC-count as a buglist column
Diffstat (limited to 'extensions/BMO')
-rw-r--r--extensions/BMO/Extension.pm9
-rw-r--r--extensions/BMO/template/en/default/hook/global/field-descs-end.none.tmpl11
2 files changed, 20 insertions, 0 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index a2a5d35af..e8b8e5173 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -900,4 +900,13 @@ sub post_bug_after_creation {
}
}
+sub buglist_columns {
+ my ($self, $args) = @_;
+ my $columns = $args->{columns};
+ $columns->{'cc_count'} = {
+ name => '(SELECT COUNT(*) FROM cc WHERE cc.bug_id = bugs.bug_id)',
+ title => 'CC Count',
+ };
+}
+
__PACKAGE__->NAME;
diff --git a/extensions/BMO/template/en/default/hook/global/field-descs-end.none.tmpl b/extensions/BMO/template/en/default/hook/global/field-descs-end.none.tmpl
new file mode 100644
index 000000000..2c8bb7494
--- /dev/null
+++ b/extensions/BMO/template/en/default/hook/global/field-descs-end.none.tmpl
@@ -0,0 +1,11 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+
+[% IF in_template_var %]
+ [% vars.field_descs.cc_count = "CC Count" %]
+[% END %]