From: Kohei Yoshino Date: Tue, 14 May 2019 21:22:33 +0000 (-0400) Subject: Bug 1225902 - Show only flags with requestee in the "Flags You Have Requested" section X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f341c289e067473c7cd90e96e0031a0b7fe5564;p=thirdparty%2Fbugzilla.git Bug 1225902 - Show only flags with requestee in the "Flags You Have Requested" section --- diff --git a/extensions/MyDashboard/lib/Queries.pm b/extensions/MyDashboard/lib/Queries.pm index 83cc84b83..e5dfd09be 100644 --- a/extensions/MyDashboard/lib/Queries.pm +++ b/extensions/MyDashboard/lib/Queries.pm @@ -14,6 +14,7 @@ use warnings; use Bugzilla; use Bugzilla::Bug; use Bugzilla::CGI; +use Bugzilla::Constants; use Bugzilla::Search; use Bugzilla::Flag; use Bugzilla::Status qw(is_open_state); @@ -258,6 +259,8 @@ sub query_flags { } else { $match_params->{'setter_id'} = $user->id; + # Exclude flags without a requestee, such as `in-testsuite?` + $match_params->{'requestee_id'} = NOT_NULL; } my $matched = Bugzilla::Flag->match($match_params); diff --git a/extensions/MyDashboard/web/js/flags.js b/extensions/MyDashboard/web/js/flags.js index 33e5047b3..3bdfebed7 100644 --- a/extensions/MyDashboard/web/js/flags.js +++ b/extensions/MyDashboard/web/js/flags.js @@ -111,9 +111,7 @@ $(function () { }; var requesteeFormatter = function(o) { - return o.value - ? o.value.htmlEncode() - : 'anyone'; + return o.value.htmlEncode(); }; var flagNameFormatter = function(o) {