Merge lp://staging/~james-w/launchpad-work-items-tracker/workitem-list-pages into lp://staging/~linaro-automation/launchpad-work-items-tracker/linaro
Proposed by
James Westby
Status: | Merged |
---|---|
Merged at revision: | 276 |
Proposed branch: | lp://staging/~james-w/launchpad-work-items-tracker/workitem-list-pages |
Merge into: | lp://staging/~linaro-automation/launchpad-work-items-tracker/linaro |
Diff against target: |
232 lines (+113/-25) 6 files modified
generate-all (+5/-0) html-report (+42/-0) report_tools.py (+19/-0) templates/base.html (+12/-5) templates/overview.html (+6/-20) templates/workitem_list.html (+29/-0) |
To merge this branch: | bzr merge lp://staging/~james-w/launchpad-work-items-tracker/workitem-list-pages |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guilherme Salgado (community) | Approve | ||
Review via email: mp+51393@code.staging.launchpad.net |
Description of the change
Hi,
Here's a branch that goes part way to addressing bug 720346.
I haven't yet worked out how to do the per-team lists nicely, so let's start
with everything in one table.
Thanks,
James
To post a comment you must log in.
Hi James,
I think this looks good but the new functions/methods would benefit from
some docstrings. I also have a few comments below.
review approve
On Sat, 2011-02-26 at 01:02 +0000, James Westby wrote: join(opts. output_ dir, "about") tools.about_ page(my_ path, opts.database, basename, opts.config, root=opts.root) tools.valid_ states: join(opts. output_ dir, status) tools.workitem_ list(my_ path, opts.database, basename, opts.config, status, root=opts.root) join(opts. output_ dir, 'index') tools.status_ overview( my_path, opts.database, basename, opts.config, root=opts.root) WorkitemTarget) : assignee completion( db, team, milestone): tools.spec_ group_completio n(db, team, milestone) in_status( db, status, team=None, milestone=None): tools.assignee_ completion( milestone) [status] : description, status, blueprint, tools.team_ information( db, team=team) dict(page_ type="about" )) tools.fill_ template( "about. html", data) in_status( opts.milestone) data(db, opts) dict(status= opts.status) ) dict(workitems= workitems) )
[...]
> === modified file 'generate-all'
> --- generate-all 2011-02-06 20:00:12 +0000
> +++ generate-all 2011-02-26 01:01:57 +0000
> @@ -133,6 +133,11 @@
> basename = os.path.
> report_
>
> +# workitems in status pages
> +for status in report_
> + basename = os.path.
> + report_
> +
> # front page
> basename = os.path.
> report_
>
> === modified file 'html-report'
> --- html-report 2011-02-25 02:56:48 +0000
> +++ html-report 2011-02-26 01:01:57 +0000
> @@ -47,6 +47,7 @@
> self.priority = priority
> self.status = status
>
> +
> class Assignee(
>
> def __init__(self, name, url, complexity=0, todo_wis=[],
> @@ -90,6 +91,19 @@
> return any([g.priority for g in self.groups])
>
>
> +class Workitem(object):
> +
> + def __init__(self, description, status, blueprint, assignee=None):
> + self.description = description
> + self.status = status
> + self.blueprint = blueprint
> + self._assignee = assignee
> +
> + @property
> + def assignee(self):
> + return self._assignee or self.blueprint.
> +
> +
> def spec_group_
> data = report_
> if not data:
> @@ -286,6 +300,21 @@
> return group
>
>
> +def workitems_
> + data = report_
> + db, team=team, milestone=
> + workitems = []
> + for assignee in data:
> + if status in data[assignee]:
> + for wi_info in data[assignee]
> + bp_name, description, priority, url = wi_info
> + blueprint = Blueprint(bp_name, url, priority=priority)
> + workitems.append(
> + Workitem(
> + assignee=assignee))
> + return workitems
> +
> +
> def list_people(db, team=None):
> team_info = report_
> if team is None:
> @@ -398,6 +427,17 @@
> data.update(
> print report_
>
> + def workitem_list(self, db, opts):
> + assert opts.status is not None, (
> + "Must pass --status for workitem_list report-type")
> + workitems = workitems_
> + db, opts.status, team=opts.team, milestone=
> + data = self.template_
> + data.update(
> + data.update(
> + ...