summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2014-10-10 19:58:41 +0200
committerDylan William Hardison <dylan@hardison.net>2014-10-10 19:58:41 +0200
commitccea670dcba24ff2ac0233437aa549b22edb390c (patch)
treed59168e74f767e4665f2736130b4e97254b83418 /Bugzilla
parent1f84551e1414eeba886e04e0e9e2a8e61d568fc1 (diff)
downloadbugzilla-ccea670dcba24ff2ac0233437aa549b22edb390c.tar.gz
bugzilla-ccea670dcba24ff2ac0233437aa549b22edb390c.tar.xz
Bug 1074586 - New Feature: Bugs of Interest
r=dkl
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Field.pm2
-rw-r--r--Bugzilla/Search.pm25
2 files changed, 24 insertions, 3 deletions
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm
index d5f8e33f9..86811d9bc 100644
--- a/Bugzilla/Field.pm
+++ b/Bugzilla/Field.pm
@@ -270,6 +270,8 @@ use constant DEFAULT_FIELDS => (
{name => 'tag', desc => 'Tags'},
{name => 'last_visit_ts', desc => 'Last Visit', buglist => 1,
type => FIELD_TYPE_DATETIME},
+ {name => 'bug_interest_ts', desc => 'Bug Interest', buglist => 1,
+ type => FIELD_TYPE_DATETIME},
{name => 'comment_tag', desc => 'Comment Tag'},
);
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 86e6764ff..7f27e96f8 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -354,9 +354,12 @@ use constant OPERATOR_FIELD_OVERRIDE => {
},
last_visit_ts => {
_non_changed => \&_last_visit_ts,
- _default => \&_last_visit_ts_invalid_operator,
+ _default => \&_invalid_operator,
+ },
+ bug_interest_ts => {
+ _non_changed => \&_bug_interest_ts,
+ _default => \&_invalid_operator,
},
-
# Custom Fields
FIELD_TYPE_FREETEXT, { _non_changed => \&_nullable },
FIELD_TYPE_BUG_ID, { _non_changed => \&_nullable_int },
@@ -387,6 +390,7 @@ sub SPECIAL_PARSING {
# last_visit field that accept both a 1d, 1w, 1m, 1y format and the
# %last_changed% pronoun.
last_visit_ts => \&_last_visit_datetime,
+ bug_interest_ts => \&_last_visit_datetime,
# BMO - Add ability to use pronoun for bug mentors field
bug_mentor => \&_commenter_pronoun,
@@ -563,6 +567,13 @@ sub COLUMN_JOINS {
from => 'bug_id',
to => 'bug_id',
},
+ bug_interest_ts => {
+ as => 'bug_interest',
+ table => 'bug_interest',
+ extra => ['bug_interest.user_id = ' . $user->id],
+ from => 'bug_id',
+ to => 'bug_id',
+ },
};
return $joins;
};
@@ -634,6 +645,7 @@ sub COLUMNS {
'longdescs.count' => 'COUNT(DISTINCT map_longdescs_count.comment_id)',
last_visit_ts => 'bug_user_last_visit.last_visit_ts',
+ bug_interest_ts => 'bug_interest.modification_time',
assignee_last_login => 'assignee.last_seen_date',
);
@@ -2788,7 +2800,14 @@ sub _last_visit_ts {
$self->_add_extra_column('last_visit_ts');
}
-sub _last_visit_ts_invalid_operator {
+sub _bug_interest_ts {
+ my ($self, $args) = @_;
+
+ $args->{full_field} = $self->COLUMNS->{bug_interest_ts}->{name};
+ $self->_add_extra_column('bug_interest_ts');
+}
+
+sub _invalid_operator {
my ($self, $args) = @_;
ThrowUserError('search_field_operator_invalid',