bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Bloodhound" <bloodhound-...@incubator.apache.org>
Subject Re: [Apache Bloodhound] #68: Dashboard should show times in a nice format than datetime
Date Mon, 14 May 2012 08:48:25 GMT
#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: <https://issues.apache.org/bloodhound/ticket/68#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Mime
View raw message