Merge lp:~brian-murray/ubuntu-sponsoring/bug-833706 into lp:~ubuntu-dev/ubuntu-sponsoring/trunk

Proposed by Brian Murray on 2012-09-07
Status: Merged
Merged at revision: 139
Proposed branch: lp:~brian-murray/ubuntu-sponsoring/bug-833706
Merge into: lp:~ubuntu-dev/ubuntu-sponsoring/trunk
Diff against target: 19 lines (+7/-2)
1 file modified
sponsors-page.py (+7/-2)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-sponsoring/bug-833706
Reviewer Review Type Date Requested Status
Daniel Holbach 2012-09-07 Approve on 2012-09-10
Review via email: mp+123333@code.launchpad.net

Description of the change

This will add release nominated tasks to which a team is subscribed to the sponsoring overview page.

It should help with https://lists.ubuntu.com/archives/ubuntu-sponsors/2012-September/025534.htm.

When testing it I didn't see any tasks in nominated_tasks though...

To post a comment you must log in.
Benjamin Drung (bdrung) wrote :

What will nominated_tasks be if release = distribution?

Brian Murray (brian-murray) wrote :

The API barfed when trying to search for tasks nominted for the distribution. I don't recall the exact error message, but it makes sense since you nominate for series / releases.

139. By Daniel Holbach on 2012-09-10

merged lp:~brian-murray/ubuntu-sponsoring/bug-833706

Daniel Holbach (dholbach) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sponsors-page.py'
2--- sponsors-page.py 2012-09-04 08:01:48 +0000
3+++ sponsors-page.py 2012-09-07 17:36:19 +0000
4@@ -301,8 +301,13 @@
5 lp_team = lp.people[SPONSOR_TEAMS[team]]
6 for release in active_releases:
7 release_name = release.name
8- team_tasks = release.searchTasks(bug_subscriber=lp_team,
9- omit_targeted=False)
10+ release_tasks = release.searchTasks(bug_subscriber=lp_team,
11+ omit_targeted=False)
12+ if release != distribution:
13+ nominated_tasks = distribution.searchTasks(nominated_for=release,
14+ bug_subscriber=lp_team)
15+ team_tasks = [task for task in release_tasks] + \
16+ [task for task in nominated_tasks]
17 for task in team_tasks:
18 bug = task.bug
19 bug_number = bug.id

Subscribers

People subscribed via source and target branches