Merge lp:~stevenk/launchpad/deal-with-unsynched-bugwatch-comments into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Steve Kowalik |
Approved revision: | no longer in the source branch. |
Merged at revision: | 16189 |
Proposed branch: | lp:~stevenk/launchpad/deal-with-unsynched-bugwatch-comments |
Merge into: | lp:launchpad |
Diff against target: |
205 lines (+40/-61) 7 files modified
Makefile (+0/-3) lib/lp/bugs/browser/bugwatch.py (+4/-4) lib/lp/bugs/browser/tests/test_bugwatch_views.py (+23/-9) lib/lp/bugs/configure.zcml (+1/-0) lib/lp/bugs/interfaces/bugwatch.py (+6/-0) lib/lp/bugs/model/bugwatch.py (+6/-11) lib/lp/bugs/stories/bugwatches/xx-delete-bugwatch.txt (+0/-34) |
To merge this branch: | bzr merge lp:~stevenk/launchpad/deal-with-unsynched-bugwatch-comments |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Booth (community) | Approve | ||
Review via email: mp+131293@code.launchpad.net |
Commit message
Also check for unsynchronized messages when checking if the Delete Bug Watch button can be displayed in the UI.
Description of the change
When deleting a bugwatch that has a message which does not contain a remote ID, it is shown in the UI as unsynchronized, and if it is the only bugmessage that references that bugwatch when that bugwatch is deleted, an OOPS will result due to a foreign key violation. I have dealt with that by adding a new method onto IBugWatch, and making use of it in the view.
This branch does not close the linked bug entirely, but it destroys the cause of the OOPS, so it can drop from Critical to Low.
I have destroyed an evil doctest for LoC credit, as well as refactoring the current method on IBugWatch.