Merge lp://staging/~wgrant/launchpad/launchpadtargetwidget-on-bugtask into lp://staging/launchpad

Proposed by William Grant
Status: Merged
Approved by: William Grant
Approved revision: no longer in the source branch.
Merged at revision: 13677
Proposed branch: lp://staging/~wgrant/launchpad/launchpadtargetwidget-on-bugtask
Merge into: lp://staging/launchpad
Diff against target: 701 lines (+219/-153)
9 files modified
lib/lp/bugs/browser/bugtask.py (+70/-81)
lib/lp/bugs/browser/tests/bugtask-edit-views.txt (+13/-12)
lib/lp/bugs/browser/tests/test_bugtask.py (+77/-4)
lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt (+10/-5)
lib/lp/bugs/stories/bugs/xx-bug-activity.txt (+2/-1)
lib/lp/bugs/stories/bugtask-management/xx-bug-privileged-statuses.txt (+2/-1)
lib/lp/bugs/stories/bugtask-management/xx-bugtask-edit-forms.txt (+3/-0)
lib/lp/bugs/templates/bugtask-edit-form.pt (+39/-46)
lib/lp/registry/stories/product/xx-product-reassignment-and-milestones.txt (+3/-3)
To merge this branch: bzr merge lp://staging/~wgrant/launchpad/launchpadtargetwidget-on-bugtask
Reviewer Review Type Date Requested Status
j.c.sackett (community) Approve
Review via email: mp+71156@code.staging.launchpad.net

Commit message

[r=jcsackett][bug=80902,253508] Bug tasks can now be freely retargeted between products, distributions and distribution source packages.

Description of the change

This branch changes BugTaskEditView to use LaunchpadTargetWidget where possible, allowing free retargeting between products and distributions and distribution source packages. The widget is used on all non-series tasks.

ProductSeries tasks are not retargetable, so they have no target widget. DistroSeries and SourcePackage tasks have the old BugTaskSourcePackageNameWidget, as only their sourcepackagename can be changed. validate() maps that into an IBugTarget. I removed the feature flag override from the sourcepackagename widget, as it's highly experimental and doesn't really work, and we're not quite sure what's happening with it.

Now that validate() and updateContextFromData() deal with IBugTargets rather than the various bits of the target key, they can push most of their validation and updating into the model. validateTransitionToTarget() and transitionToTarget() now handle all the messy target logic.

I've removed a pointless and erroneous sourcepackagename-change-specific "The bug supervisor for %s has been subscribed to this bug." notification, fixing bug #253508.

Lots of tests are updated to use LaunchpadTargetWidget, and three new ones have been added for SourcePackage retargeting.

To post a comment you must log in.
Revision history for this message
j.c.sackett (jcsackett) wrote :

Looks good to me. Thanks William, a lot of people will be happy with this change.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.