From 63a1d66888534a188525dc13a159908adcc86a67 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 17 Sep 2013 15:20:09 +0800 Subject: Bug 902457: Remove 'Include Closed' from MyDashboard (show all requests regardless of a bug's status) --- extensions/MyDashboard/lib/Queries.pm | 6 +----- extensions/MyDashboard/lib/WebService.pm | 4 +--- .../template/en/default/pages/mydashboard.html.tmpl | 4 ---- extensions/MyDashboard/web/js/flags.js | 10 +--------- 4 files changed, 3 insertions(+), 21 deletions(-) (limited to 'extensions/MyDashboard') diff --git a/extensions/MyDashboard/lib/Queries.pm b/extensions/MyDashboard/lib/Queries.pm index 3156a94c5..435aa7ef4 100644 --- a/extensions/MyDashboard/lib/Queries.pm +++ b/extensions/MyDashboard/lib/Queries.pm @@ -164,7 +164,7 @@ sub query_bugs { } sub query_flags { - my ($type, $include_closed) = @_; + my ($type) = @_; my $user = Bugzilla->user; my $dbh = Bugzilla->dbh; my $date_now = DateTime->now(time_zone => $user->timezone); @@ -232,10 +232,6 @@ sub query_flags { # Skip this flag if the bug is not visible to the user next if !$visible_bugs{$flag->{'bug_id'}}; - # Skip closed unless user requested closed bugs - next if (!$include_closed - && !is_open_state($visible_bugs{$flag->{'bug_id'}}->{'bug_status'})); - # Include bug status and summary with each flag $flag->{'bug_status'} = $visible_bugs{$flag->{'bug_id'}}->{'bug_status'}; $flag->{'bug_summary'} = $visible_bugs{$flag->{'bug_id'}}->{'short_desc'}; diff --git a/extensions/MyDashboard/lib/WebService.pm b/extensions/MyDashboard/lib/WebService.pm index 69f43f322..41d327446 100644 --- a/extensions/MyDashboard/lib/WebService.pm +++ b/extensions/MyDashboard/lib/WebService.pm @@ -87,9 +87,7 @@ sub run_flag_query { { function => 'MyDashboard.run_flag_query', param => 'type' }); - my $include_closed = $params->{include_closed} || 0; - my $results = query_flags($type, $include_closed); - + my $results = query_flags($type); return { result => { $type => $results }}; } diff --git a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl index 83afd85d5..3f5f45f1d 100644 --- a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl +++ b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl @@ -126,8 +126,6 @@ 0 flags found | Refresh | Buglist - | -
@@ -140,8 +138,6 @@ 0 flags found | Refresh | Buglist - | -
diff --git a/extensions/MyDashboard/web/js/flags.js b/extensions/MyDashboard/web/js/flags.js index 3ac51acac..283a16434 100644 --- a/extensions/MyDashboard/web/js/flags.js +++ b/extensions/MyDashboard/web/js/flags.js @@ -26,8 +26,6 @@ YUI({ var updateFlagTable = function(type) { if (!type) return; - var include_closed = Y.one('#' + type + '_closed').get('checked') ? 1 : 0; - counter = counter + 1; var callback = { @@ -49,7 +47,7 @@ YUI({ version: "1.1", method: "MyDashboard.run_flag_query", id: counter, - params: { type : type, include_closed: include_closed } + params: { type : type } }; var stringified = Y.JSON.stringify(json_object); @@ -159,9 +157,6 @@ YUI({ Y.one('#requestee_buglist').on('click', function(e) { loadBugList('requestee'); }); - Y.one('#requestee_closed').on('change', function(e) { - updateFlagTable('requestee'); - }); // Requester dataSource.requester = new Y.DataSource.IO({ source: 'jsonrpc.cgi' }); @@ -209,7 +204,4 @@ YUI({ Y.one('#requester_buglist').on('click', function(e) { loadBugList('requester'); }); - Y.one('#requester_closed').on('change', function(e) { - updateFlagTable('requester'); - }); }); -- cgit v1.2.3-24-g4f1b