Merge lp://staging/~deryck/launchpad/do-the-right-thing-dupe-move-78596 into lp://staging/launchpad
Status: | Merged |
---|---|
Approved by: | Deryck Hodge |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11188 |
Proposed branch: | lp://staging/~deryck/launchpad/do-the-right-thing-dupe-move-78596 |
Merge into: | lp://staging/launchpad |
Diff against target: |
1018 lines (+214/-276) 31 files modified
lib/canonical/launchpad/fields/__init__.py (+0/-11) lib/canonical/launchpad/mail/commands.py (+21/-11) lib/lp/bugs/browser/bug.py (+27/-0) lib/lp/bugs/browser/tests/bug-subscription-views.txt (+1/-1) lib/lp/bugs/browser/tests/bug-views.txt (+5/-4) lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt (+1/-1) lib/lp/bugs/browser/tests/special/bugtarget-recently-touched-bugs.txt (+1/-1) lib/lp/bugs/configure.zcml (+0/-2) lib/lp/bugs/doc/bug.txt (+13/-14) lib/lp/bugs/doc/bugactivity.txt (+9/-7) lib/lp/bugs/doc/bugnotification-sending.txt (+3/-2) lib/lp/bugs/doc/bugsubscription.txt (+2/-2) lib/lp/bugs/doc/bugtask-package-bugcounts.txt (+1/-1) lib/lp/bugs/doc/bugtask-search.txt (+1/-1) lib/lp/bugs/doc/bugzilla-import.txt (+3/-4) lib/lp/bugs/doc/checkwatches.txt (+2/-2) lib/lp/bugs/doc/malone-karma.txt (+1/-1) lib/lp/bugs/interfaces/bug.py (+3/-4) lib/lp/bugs/model/bug.py (+3/-5) lib/lp/bugs/scripts/bugimport.py (+2/-2) lib/lp/bugs/scripts/bugzilla.py (+1/-1) lib/lp/bugs/stories/duplicate-bug-handling/10-mark-bug-as-duplicate.txt (+0/-48) lib/lp/bugs/stories/duplicate-bug-handling/20-show-bug-is-duplicate.txt (+0/-41) lib/lp/bugs/stories/duplicate-bug-handling/xx-mark-duplicate-validation.txt (+0/-76) lib/lp/bugs/tests/bug.py (+2/-1) lib/lp/bugs/tests/bugs-emailinterface.txt (+1/-27) lib/lp/bugs/tests/bugtarget-bugcount.txt (+1/-1) lib/lp/bugs/tests/test_bugchanges.py (+6/-3) lib/lp/bugs/tests/test_bugnotification.py (+1/-1) lib/lp/bugs/tests/test_duplicate_handling.py (+102/-0) lib/lp/registry/browser/tests/person-views.txt (+1/-1) |
To merge this branch: | bzr merge lp://staging/~deryck/launchpad/do-the-right-thing-dupe-move-78596 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+27144@code.staging.launchpad.net |
Commit message
Converge on using markAsDuplicate rather than setting duplicateof directly. Also, enable automatic moving of duplicates when marking a bug a duplicate that itself has duplicates.
Description of the change
This branch fixes the bugs team's handling of setting duplicates. Before
this work, there were two ways to set a duplicate of a bug -- setting
duplicateof directly or using markAsDuplicate. Setting duplicateof
directly was commonly used; however, this bypassed validation provided in
markAsDuplicate and really should not have been done. This branch fixes
that by converting to use markAsDuplicate consistently and changing the
interface and zcml to make duplicateof readonly. I also removed the
previous field readonly_duplicate, which seemed to be a hackish way to
achieve this for the API without doing all the work here.
This fixes bug 589660.
While I was here and because I was changing how validation was tested, I
decided to do a three line fix to enable moving of duplicates. Until now,
if you wanted to mark a bug as a duplicate and that bug had duplicates
itself, you had to manually move all the duplicates. This changes that
behavior so that the duplicates are moved across automatically.
This fixes bug 78596.
I don't want to land this branch until I add a confirmation dialog in
JavaScript for marking duplicate bug that also has duplicates. This was
suggested during a bugs team standup, since it would be a lot of work to
undo the damage if people aren't aware of the coming change. This branch
has gotten long with all the tests changed, so I want to review it first
before doing the small UI work left.
I had pre-implementation discussions with Björn and mid-implementation
discussions with Abel.
Appologies for the length of the diff, but most of this is removing dead
tests and one-line changes to lots of files to move from using duplicateof
to markAsDuplicate.
Files changed:
lib/lp/
lib/lp/
lib/lp/
Removed readonly_duplicate and made duplicateof
a properly readonly field.
lib/lp/
Update form to use markAsDuplicate and not
set duplicateof directly.
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
All tests and call sites updated to use markAsDuplicate,
rather than set duplicateof directly
In some cases, I changed the data used in the test
because tests were wrong. Using duplicateof
bypassed validation, and tests were settings bugs
to duplicate of bugs that were already themselves
duplicates.
lib/lp/
lib/lp/
lib/lp/
Removed page tests that are now covered by other
tests, either the new dupe handling unit test or
Windmill test.
lib/lp/
Added unit test to verify duplicateof is read-only,
that validation works, and that duplicates are
moved properly.
lib/canonical/
Remove validation preventing moving duplicates.
I've filed Bug #591705 about the remaining UI work before this can land.