Merge lp:~james-w/launchpad/kill-task_age into lp:launchpad

Proposed by James Westby
Status: Merged
Merged at revision: not available
Proposed branch: lp:~james-w/launchpad/kill-task_age
Merge into: lp:launchpad
Diff against target: 37 lines (+2/-11)
2 files modified
lib/lp/bugs/interfaces/bugtask.py (+2/-4)
lib/lp/bugs/stories/webservice/xx-bug.txt (+0/-7)
To merge this branch: bzr merge lp:~james-w/launchpad/kill-task_age
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) release-critical Approve
Eleanor Berger (community) Approve
Review via email: mp+18418@code.launchpad.net
To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Kill task_age to fix bug 515747.

Thanks,

James

Revision history for this message
Eleanor Berger (intellectronica) wrote :

Thanks for the branch, James.

review: Approve
Revision history for this message
Francis J. Lacoste (flacoste) :
review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/bugs/interfaces/bugtask.py'
--- lib/lp/bugs/interfaces/bugtask.py 2010-01-23 21:42:36 +0000
+++ lib/lp/bugs/interfaces/bugtask.py 2010-02-01 22:52:17 +0000
@@ -470,11 +470,9 @@
470 description=_("The age of this task, expressed as the "470 description=_("The age of this task, expressed as the "
471 "length of time between the creation date "471 "length of time between the creation date "
472 "and now."))472 "and now."))
473 task_age = exported(473 task_age = Int(title=_("Age of the bug task"),
474 Int(title=_("Age of the bug task"),
475 description=_("The age of this task in seconds, a delta between "474 description=_("The age of this task in seconds, a delta between "
476 "now and the date the bug task was created."),475 "now and the date the bug task was created."))
477 readonly=True))
478 owner = exported(476 owner = exported(
479 Reference(title=_("The owner"), schema=IPerson, readonly=True))477 Reference(title=_("The owner"), schema=IPerson, readonly=True))
480 target = exported(Reference(478 target = exported(Reference(
481479
=== modified file 'lib/lp/bugs/stories/webservice/xx-bug.txt'
--- lib/lp/bugs/stories/webservice/xx-bug.txt 2010-01-26 19:36:17 +0000
+++ lib/lp/bugs/stories/webservice/xx-bug.txt 2010-02-01 22:52:17 +0000
@@ -331,15 +331,8 @@
331 self_link: u'http://api.../debian/+source/mozilla-firefox/+bug/1'331 self_link: u'http://api.../debian/+source/mozilla-firefox/+bug/1'
332 status: u'Confirmed'332 status: u'Confirmed'
333 target_link: u'http://api.../debian/+source/mozilla-firefox'333 target_link: u'http://api.../debian/+source/mozilla-firefox'
334 task_age: ...
335 title: u'Bug #1 in mozilla-firefox (Debian): "Firefox does not support SVG"'334 title: u'Bug #1 in mozilla-firefox (Debian): "Firefox does not support SVG"'
336335
337Because task age is a dynamic calculation between now and the date_created
338we will just verify that an integer is returned.
339
340 >>> print type(bug_one_bugtasks[0]['task_age'])
341 <type 'int'>
342
343The collection of bug tasks is not exposed as a resource:336The collection of bug tasks is not exposed as a resource:
344337
345 >>> webservice.get("/bug_tasks").status338 >>> webservice.get("/bug_tasks").status