From 102c9694ef56fd673fe31729e67b650befb9df44 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Fri, 7 Dec 2012 18:02:03 -0500 Subject: Current dashboard work --- extensions/MyDashboard/lib/Queries.pm | 9 +- .../en/default/pages/mydashboard.html.tmpl | 14 +-- extensions/MyDashboard/web/js/prod_comp_search.js | 99 +++++++--------------- extensions/MyDashboard/web/js/query.js | 2 +- extensions/MyDashboard/web/styles/mydashboard.css | 12 +-- 5 files changed, 47 insertions(+), 89 deletions(-) diff --git a/extensions/MyDashboard/lib/Queries.pm b/extensions/MyDashboard/lib/Queries.pm index cbba3b468..628e26a73 100644 --- a/extensions/MyDashboard/lib/Queries.pm +++ b/extensions/MyDashboard/lib/Queries.pm @@ -12,6 +12,7 @@ use strict; use Bugzilla; use Bugzilla::CGI; use Bugzilla::Search; +use Bugzilla::Util qw(format_time); use Bugzilla::Extension::MyDashboard::Util qw(open_states quoted_open_states); use Bugzilla::Extension::MyDashboard::TimeAgo qw(time_ago); @@ -136,7 +137,6 @@ sub query_bugs { my $search = new Bugzilla::Search( fields => [ SELECT_COLUMNS ], params => scalar $params->Vars, - order => [ QUERY_ORDER ]); my $query = $search->sql(); @@ -149,10 +149,11 @@ sub query_bugs { my $bug = {}; foreach my $column (SELECT_COLUMNS) { $bug->{$column} = shift @$row; - #if ($column eq 'changeddate') { + if ($column eq 'changeddate') { + $bug->{$column} = format_time($bug->{$column}, '%Y-%m-%d %H:%M'); # my $date_then = datetime_from($bug->{$column}); # $bug->{'updated'} = time_ago($date_then, $date_now); - #} + } } push(@bugs, $bug); } @@ -185,7 +186,7 @@ sub query_flags { attachments.description AS attach_summary, requesters.realname AS requester, requestees.realname AS requestee, - " . $dbh->sql_date_format('flags.creation_date', '%Y:-%m-%d %H:%i') . " AS created + " . $dbh->sql_date_format('flags.creation_date', '%Y-%m-%d %H:%i') . " AS created FROM flags LEFT JOIN attachments ON ($attach_join_clause) diff --git a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl index d7cdb0d28..a386b6716 100644 --- a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl +++ b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl @@ -58,13 +58,15 @@