Skip to content

Commit 671df6e

Browse files
author
Richard Jones
committed
Fix scripts/roundup-reminder date calculation [SF#1649979]
1 parent 5a2670a commit 671df6e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/roundup-reminder

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
# SOFTWARE.
2121

22-
# $Id: roundup-reminder,v 1.8 2004-02-11 00:21:46 richard Exp $
22+
# $Id: roundup-reminder,v 1.9 2007-02-15 03:52:35 richard Exp $
2323

2424
'''
2525
Simple script that emails all users of a tracker with the issues that
@@ -96,7 +96,7 @@ for user_id in db.user.list():
9696
body = part.startbody('text/plain')
9797

9898
# do the plain text bit
99-
print >>body, 'Created ID Urgency Title'
99+
print >>body, 'Created ID Activity Title'
100100
print >>body, '='*75
101101
# '2 months 213 immediate cc_daemon barfage
102102
old_priority = None
@@ -106,10 +106,10 @@ for user_id in db.user.list():
106106
old_priority = priority
107107
print >>body, ' ', db.priority.get(priority,'name')
108108
# pretty creation
109-
creation = (date.Date('.') - creation_date).pretty()
109+
creation = (creation_date - date.Date('.')).pretty()
110110
if creation is None:
111111
creation = creation_date.pretty()
112-
activity = (date.Date('.') - activity_date).pretty()
112+
activity = (activity_date - date.Date('.')).pretty()
113113
title = db.issue.get(issue_id, 'title')
114114
if len(title) > 42:
115115
title = title[:38] + ' ...'
@@ -147,11 +147,11 @@ and click on "My Issues". Do NOT respond to this message.
147147
print >>body, '<tr><td>-></td><td>-></td><td>-></td><td><b>%s</b></td></tr>'%db.priority.get(priority,'name')
148148
creation = (date.Date('.') - creation_date).pretty()
149149
if creation is None:
150-
creation = creation_date.pretty()
150+
creation = (creation_date - date.Date('.')).pretty()
151151
title = db.issue.get(issue_id, 'title')
152152
issue_id = '<a href="%sissue%s">%s</a>'%(db.config.TRACKER_WEB,
153153
issue_id, issue_id)
154-
activity = (date.Date('.') - activity_date).pretty()
154+
activity = (activity_date - date.Date('.')).pretty()
155155
print >>body, '''<tr><td>%s</td><td>%s</td><td>%s</td>
156156
<td>%s</td></tr>'''%(creation, issue_id, activity, title)
157157
print >>body, '</table>'

0 commit comments

Comments
 (0)