Merge lp:~intellectronica/launchpad/unexport-task-age-again into lp:launchpad

Proposed by Eleanor Berger
Status: Merged
Approved by: Eleanor Berger
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~intellectronica/launchpad/unexport-task-age-again
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:~intellectronica/launchpad/unexport-task-age-again
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) release-critical Approve
Eleanor Berger (community) code Approve
Review via email: mp+20900@code.launchpad.net

Commit message

Unexport Bugtask.task_age (again).

Description of the change

This branch unexports Bugtask.task_age once again. It got re-introduced with the merge of stable into devel.

To post a comment you must log in.
Revision history for this message
Eleanor Berger (intellectronica) wrote :

rs=deryck

review: Approve (rs)
Revision history for this message
Eleanor Berger (intellectronica) :
review: Approve (code)
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-02-27 20:20:03 +0000
+++ lib/lp/bugs/interfaces/bugtask.py 2010-03-09 11:04:34 +0000
@@ -502,11 +502,9 @@
502 description=_("The age of this task, expressed as the "502 description=_("The age of this task, expressed as the "
503 "length of time between the creation date "503 "length of time between the creation date "
504 "and now."))504 "and now."))
505 task_age = exported(505 task_age = Int(title=_("Age of the bug task"),
506 Int(title=_("Age of the bug task"),
507 description=_("The age of this task in seconds, a delta between "506 description=_("The age of this task in seconds, a delta between "
508 "now and the date the bug task was created."),507 "now and the date the bug task was created."))
509 readonly=True))
510 owner = exported(508 owner = exported(
511 Reference(title=_("The owner"), schema=Interface, readonly=True))509 Reference(title=_("The owner"), schema=Interface, readonly=True))
512 target = exported(Reference(510 target = exported(Reference(
513511
=== modified file 'lib/lp/bugs/stories/webservice/xx-bug.txt'
--- lib/lp/bugs/stories/webservice/xx-bug.txt 2010-03-08 09:02:25 +0000
+++ lib/lp/bugs/stories/webservice/xx-bug.txt 2010-03-09 11:04:34 +0000
@@ -339,15 +339,8 @@
339 self_link: u'http://api.../debian/+source/mozilla-firefox/+bug/1'339 self_link: u'http://api.../debian/+source/mozilla-firefox/+bug/1'
340 status: u'Confirmed'340 status: u'Confirmed'
341 target_link: u'http://api.../debian/+source/mozilla-firefox'341 target_link: u'http://api.../debian/+source/mozilla-firefox'
342 task_age: ...
343 title: u'Bug #1 in mozilla-firefox (Debian): "Firefox does not support SVG"'342 title: u'Bug #1 in mozilla-firefox (Debian): "Firefox does not support SVG"'
344343
345Because task age is a dynamic calculation between now and the date_created
346we will just verify that an integer is returned.
347
348 >>> print type(bug_one_bugtasks[0]['task_age'])
349 <type 'int'>
350
351The collection of bug tasks is not exposed as a resource:344The collection of bug tasks is not exposed as a resource:
352345
353 >>> webservice.get("/bug_tasks").status346 >>> webservice.get("/bug_tasks").status