Timestamp handling within UI

4 views
Skip to first unread message

Ilias Lazaridis

unread,
Oct 20, 2006, 10:56:24 AM10/20/06
to Trac Development
I am currently introducing the ability to use "order=changetime" within
a ticket-query.

So far everything is fine, you can see the status within this ticket:

http://trac.edgewall.org/ticket/3990

One tiny problem:

within the ticket-table (query results), the "changetime" content is
shown as ordinary text.

"1161343115"

which is the simplest way (or where is the location) to introduce a
formatter, thus I can see the value e.g. in ISO format
(2006-10-20T17:29)?

(I've a burn-out at this point, but would like to finish this today, so
any hint (or quick-hack) can help-out.)

Christian Boos

unread,
Oct 20, 2006, 11:33:41 AM10/20/06
to trac...@googlegroups.com
Ilias Lazaridis wrote:
> I am currently introducing the ability to use "order=changetime" within
> a ticket-query.
>
> So far everything is fine, you can see the status within this ticket:
>
> http://trac.edgewall.org/ticket/3990
>
> One tiny problem:
>

the whole query stuff has to be fixed w.r.t the recent datetime changes.
I have that next on my TODO list, so these issues should be fixed soon
(over the W.E. normally).

-- Christian

Ilias Lazaridis

unread,
Oct 20, 2006, 12:30:02 PM10/20/06
to Trac Development

Sounds good!

But I'm at this point 'caught' by this tiny task, and need to fulfill
it to become calmy again.

I've implemented it this way:

http://trac.edgewall.org/attachment/ticket/3990/TicketQueryMacroAddTimestampFormatting.diff

which runs fine within the wiki.

But in the query module, this leads to an error (most possibly due to
the converted timestamp-value):

UnicodeEncodeError: 'decimal' codec can't encode character u'\u03bc' in
position 18: invalid decimal Unicode string

"
File "p:\org\trac\trac\ticket\query.py", line 407, in template_data
Code fragment:

401. groupsequence = []
402. for ticket in tickets:
403. if orig_list:
404. # Mark tickets added or changed since the query was first
405. # executed
406. if int(ticket['time']) > orig_time:
"

local vars:
ticket {u'status': u'new', u'changetime': u'20/10/2006 2:18:35
\u03bc\u03bc', ...
orig_time 1161361294

So, I guess that was the wrong point to change the display-value.

.

Ilias Lazaridis

unread,
Oct 20, 2006, 4:32:05 PM10/20/06
to Trac Development
Ilias Lazaridis wrote:
> Christian Boos wrote:
> > Ilias Lazaridis wrote:
> > > I am currently introducing the ability to use "order=changetime" within
> > > a ticket-query.
> > >
> > > So far everything is fine, you can see the status within this ticket:
> > >
> > > http://trac.edgewall.org/ticket/3990
> > >
> > > One tiny problem:
> >
> > the whole query stuff has to be fixed w.r.t the recent datetime changes.
> > I have that next on my TODO list, so these issues should be fixed soon
> > (over the W.E. normally).
>
> Sounds good!
>
> But I'm at this point 'caught' by this tiny task, and need to fulfill
> it to become calmy again.
>
> I've implemented it this way:
>
> http://trac.edgewall.org/attachment/ticket/3990/TicketQueryMacroAddTimestampFormatting.diff

I've found finally a simple solution.

this patch does the work, within the wiki and the UI:

http://trac.edgewall.org/attachment/ticket/3990/TicketQueryMacroAddTimestampFormattingInt.diff

Ilias Lazaridis

unread,
Oct 20, 2006, 4:55:53 PM10/20/06
to Trac Development

Will this introduce major changes to the code?

If so, would it be possible to delay the commits for one or two days?

I need to specify/implement one or two final changes, after this I can
deal with larger code changes.

http://dev.lazaridis.com/base/wiki/PlanTicketQueryMacro

.

Reply all
Reply to author
Forward
0 new messages