← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~danilo/launchpad/milestone-all-bps into lp:launchpad

 

The proposal to merge lp:~danilo/launchpad/milestone-all-bps into lp:launchpad has been updated.

Description changed to:

= Bug #1021196: show partialy targeted blueprints in milestones =

When a certain blueprint has work items targeted to a milestone, but is itself not targeted to it, it currently doesn't show up in a milestone page.

It should, with a note how it's not targeted to be completed in a milestone.  This should make multi-milestone blueprints much more useful.

== Proposed fix ==

Refactor Milestone.specifications and ProjectMilestone.specifications to use Storm and look into SpecificationWorkItems as well.

Prejoins to Person table are replaced with LeftJoins and Persons are collected as well, but stripped out using DecoratedResultSet.

I've added a simple text "(some work for this milestone)" for blueprints which are not targeted to the milestone you are looking at, but I didn't add any pagetests for this (and since I dislike page tests, I'd rather not add them).  I've also used "python:" in TAL because I'd have to create a decorated Specification object to use if I wanted to put this in a simple tal:condition (which is too much work, but would allow easier testing).

== LOC Rationale ==

This is part of https://dev.launchpad.net/Projects/WorkItems

As documented in

  https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AvOsYPy8e7yUdGkyRmx2WGFwT3NnSjdHVW04Q1pvSmc

we are still at -407 lines before this branch.

== Tests ==

For added tests:
  bin/test -cvvt MilestonesContainsPartialSpecifications

For all on milestones:
  bin/test -cvvt milestone

== Demo and Q/A ==

Create a project with two milestones ("other" and "this").
Add a project to project group.

Create a BP on the project with two workitems targeted to "this"
milestone.  Target a blueprint to "other" milestone.

Create another BP on the project with a single workitem and target
the blueprint to "this" milestone.

Load both project and project-group milestone pages for the "this" milestone
and ensure both BPs show up.

Load milestone pages for "other" milestone and ensure only the first BP
shows up.

Note: we should also look over all the milestone pages to ensure we are not introducing timeouts or increasing query count (fwiw, we could even be reducing it).

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/templates/milestone-index.pt
  lib/lp/registry/tests/test_milestone.py
  lib/lp/registry/model/milestone.py

For more details, see:
https://code.launchpad.net/~danilo/launchpad/milestone-all-bps/+merge/113531
-- 
https://code.launchpad.net/~danilo/launchpad/milestone-all-bps/+merge/113531
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~danilo/launchpad/milestone-all-bps into lp:launchpad.


References