Roundup Tracker - Issues

Message1070

Author anonymous
Recipients
Date 2003-12-03.15:17:40
Message-id
In-reply-to
From: ron_dagostino@ssga.com

This affectes what you see in the GUI -- something with 
activity yesterday actually shows activity 
as "tomorrow", which is counter-intuitive.

>>> from roundup.date import Date
>>> from roundup.cgi.templating import 
DateHTMLProperty
>>> client = Date('.')
>>> client.db = 1
>>> y = DateHTMLProperty(client, None, None, None, 
None, Date('-1d'))
>>> y.reldate()
'tomorrow'         <<<<<<<<<<<<<<<<<<<<
>>>


Here is a patch to the reldate() method of templating.py:

diff templating.py~ templating.py
1054c1054
<         interval = date.Date('.') - self._value
---
>         interval = self._value - date.Date('.')
bash-2.05b$ 

>>> from roundup.date import Date
>>> from roundup.cgi.templating import 
DateHTMLProperty
>>> client = Date('.')
>>> client.db = 1
>>> y = DateHTMLProperty(client, None, None, None, 
None, Date('-1d'))
>>> y.reldate()
'yesterday'       <<< Fixed, plus the GUI is now correct
>>>
History
Date User Action Args
2009-02-03 14:20:33adminlinkissue853345 messages
2009-02-03 14:20:33admincreate