Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Bugzilla/Field.pm
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ use constant DEFAULT_FIELDS => (
type => FIELD_TYPE_DATETIME
},
{name => 'comment_tag', desc => 'Comment Tag'},
{name => 'blocked_somewhere', desc => 'Blocked Somewhere',
is_numeric => 1},
{
name => 'triage_owner',
desc => 'Triage Owner',
Expand Down
15 changes: 15 additions & 0 deletions Bugzilla/Search.pm
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ use constant OPERATOR_FIELD_OVERRIDE => {
{_non_changed => \&_last_visit_ts, _default => \&_invalid_operator,},
bug_interest_ts =>
{_non_changed => \&_bug_interest_ts, _default => \&_invalid_operator,},
blocked_somewhere => { _default => \&_blocked_somewhere,},
triage_owner => {_non_changed => \&_triage_owner_nonchanged,},

# Custom Fields
Expand Down Expand Up @@ -625,6 +626,14 @@ sub COLUMNS {
last_visit_ts => 'bug_user_last_visit.last_visit_ts',
bug_interest_ts => 'bug_interest.modification_time',
assignee_last_login => 'assignee.last_seen_date',
blocked_somewhere =>
"(CASE WHEN bugs.bug_id IN"
. " (SELECT blocked FROM dependencies JOIN bugs ON (dependencies.dependson = bugs.bug_id)"
. " WHERE bug_status IN"
. " (SELECT value FROM bug_status WHERE is_open = 1) GROUP BY blocked)"
. " THEN 1"
. " ELSE 0"
. " END)",
);

if ($user->id) {
Expand Down Expand Up @@ -2954,6 +2963,12 @@ sub _days_elapsed {
. $dbh->sql_to_days('bugs.delta_ts') . ")";
}

sub _blocked_somewhere {
my ($self, $args) = @_;

$args->{full_field} = $self->COLUMNS->{blocked_somewhere}->{name};
}

sub _assignee_last_login {
my ($self, $args) = @_;

Expand Down
Loading