summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2014-05-20 11:32:33 +0200
committerDylan William Hardison <dylan@hardison.net>2014-05-27 22:17:29 +0200
commitda0dd8408f4bd2a31fc6c8c752d0f89d10212a2d (patch)
treecfe56da23d991baca2227587f8b4a0377f43acb3 /extensions
parent049ea3d136ca73c82f5aa530f328d2596f8e6090 (diff)
downloadbugzilla-da0dd8408f4bd2a31fc6c8c752d0f89d10212a2d.tar.gz
bugzilla-da0dd8408f4bd2a31fc6c8c752d0f89d10212a2d.tar.xz
Bug 1003970 - Tagging comments not shown in user activity
r=glob
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/lib/Reports/UserActivity.pm29
-rw-r--r--extensions/BMO/template/en/default/pages/user_activity.html.tmpl4
2 files changed, 32 insertions, 1 deletions
diff --git a/extensions/BMO/lib/Reports/UserActivity.pm b/extensions/BMO/lib/Reports/UserActivity.pm
index dc0ee26d3..a961096a6 100644
--- a/extensions/BMO/lib/Reports/UserActivity.pm
+++ b/extensions/BMO/lib/Reports/UserActivity.pm
@@ -54,6 +54,7 @@ sub report {
my ($activity_joins, $activity_where) = ('', '');
my ($attachments_joins, $attachments_where) = ('', '');
+ my ($tags_activity_joins, $tags_activity_where) = ('', '');
if (Bugzilla->params->{"insidergroup"}
&& !Bugzilla->user->in_group(Bugzilla->params->{'insidergroup'}))
{
@@ -61,6 +62,10 @@ sub report {
ON attachments.attach_id = bugs_activity.attach_id";
$activity_where = "AND COALESCE(attachments.isprivate, 0) = 0";
$attachments_where = $activity_where;
+
+ $tags_activity_joins = 'LEFT JOIN longdescs
+ ON longdescs_tags_activity.comment_id = longdescs.comment_id';
+ $tags_activity_where = 'AND COALESCE(longdescs.isprivate, 0) = 0';
}
my @who_bits;
@@ -92,7 +97,7 @@ sub report {
$from_dt = $from_dt->ymd() . ' 00:00:00';
$to_dt = $to_dt->ymd() . ' 23:59:59';
my @params;
- for (1..4) {
+ for (1..5) {
push @params, @who;
push @params, ($from_dt, $to_dt);
}
@@ -129,6 +134,28 @@ sub report {
UNION ALL
SELECT
+ 'comment_tag' AS name,
+ longdescs_tags_activity.bug_id,
+ NULL as attach_id,
+ ".$dbh->sql_date_format('longdescs_tags_activity.bug_when',
+ '%Y.%m.%d %H:%i:%s') . " AS bug_when,
+ longdescs_tags_activity.removed,
+ longdescs_tags_activity.added,
+ profiles.login_name,
+ longdescs_tags_activity.comment_id,
+ longdescs_tags_activity.bug_when
+ FROM longdescs_tags_activity
+ $tags_activity_joins
+ INNER JOIN profiles
+ ON profiles.userid = longdescs_tags_activity.who
+ WHERE profiles.login_name IN ($who_bits)
+ AND longdescs_tags_activity.bug_when >= ?
+ AND longdescs_tags_activity.bug_when <= ?
+ $tags_activity_where
+
+ UNION ALL
+
+ SELECT
'bug_id' AS name,
bugs.bug_id,
NULL AS attach_id,
diff --git a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
index f299b862b..ef2115bcb 100644
--- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
@@ -160,6 +160,10 @@
[% "Comment $change.comment.count"
FILTER bug_link(operation.bug, comment_num => change.comment.count)
FILTER none %]
+ [% ELSIF change.comment.defined && change.fieldname == 'comment_tag' %]
+ [% "Comment $change.comment.count Tagged"
+ FILTER bug_link(operation.bug, comment_num => change.comment.count)
+ FILTER none %]
[% ELSE %]
[%+ field_descs.${change.fieldname} FILTER html %]
[% END %]