Return-Path: X-Original-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F5F59570 for ; Mon, 14 May 2012 08:48:28 +0000 (UTC) Received: (qmail 95302 invoked by uid 500); 14 May 2012 08:48:28 -0000 Delivered-To: apmail-incubator-bloodhound-commits-archive@incubator.apache.org Received: (qmail 95282 invoked by uid 500); 14 May 2012 08:48:28 -0000 Mailing-List: contact bloodhound-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-commits@incubator.apache.org Received: (qmail 95270 invoked by uid 99); 14 May 2012 08:48:28 -0000 Received: from bloodhound-vm.apache.org (HELO bloodhound-vm) (140.211.11.32) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 May 2012 08:48:28 +0000 Received: from bloodhound-vm.apache.org (localhost [127.0.0.1]) by bloodhound-vm (Postfix) with ESMTP id 8AE3B80705; Mon, 14 May 2012 08:48:27 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit From: "Apache Bloodhound" X-Trac-Version: 0.13dev-r10952 Cc: bloodhound-commits@incubator.apache.org Auto-Submitted: auto-generated X-Mailer: Trac 0.13dev-r10952, by Edgewall Software X-Trac-Project: Apache Bloodhound Date: Mon, 14 May 2012 08:48:25 -0000 Reply-To: bloodhound-dev@incubator.apache.org X-URL: https://issues.apache.org/bloodhound/ Subject: Re: [Apache Bloodhound] #68: Dashboard should show times in a nice format than datetime X-Trac-Ticket-URL: https://issues.apache.org/bloodhound/ticket/68#comment:1 Message-ID: <067.940221ac2a45b67da8707c0ffdd68e45@incubator.apache.org> References: <052.0c8d013edcd306018880bf10e730b684@incubator.apache.org> X-Trac-Ticket-ID: 68 In-Reply-To: <052.0c8d013edcd306018880bf10e730b684@incubator.apache.org> #68: Dashboard should show times in a nice format than datetime --------------------------+-------------------- Reporter: gjm | Owner: nobody Type: enhancement | Status: new Priority: major | Milestone: Component: dashboard | Version: Resolution: | Keywords: --------------------------+-------------------- Comment (by gjm): A possible fix (suggestion from a while back via Olemis) is to make the following change to trac core: {{{ #!diff Index: trac/trac/ticket/query.py =================================================================== --- trac/trac/ticket/query.py (revision 1333384) +++ trac/trac/ticket/query.py (working copy) @@ -34,8 +34,9 @@ from trac.ticket.api import TicketSystem from trac.ticket.model import Milestone, group_milestones from trac.util import Ranges, as_bool -from trac.util.datefmt import format_datetime, from_utimestamp, parse_date, \ - to_timestamp, to_utimestamp, utc, user_time +from trac.util.datefmt import format_date, format_datetime, from_utimestamp, \ + parse_date, to_timestamp, to_utimestamp, utc, \ + user_time from trac.util.presentation import Paginator from trac.util.text import empty, shorten_line, quote_query_string from trac.util.translation import _, tag_, cleandoc_ @@ -753,6 +754,9 @@ ticket['changed'] = True if self.group: group_key = ticket[self.group] + # If grouping by datetime field use days rather than time + if self.group in ('changetime', 'time'): + group_key = format_date(group_key) groups.setdefault(group_key, []).append(ticket) if not groupsequence or group_key not in groupsequence: groupsequence.append(group_key) }}} -- Ticket URL: Apache Bloodhound The Apache Bloodhound (incubating) issue tracker