IntegrityError raised deleting a series
Bug #899123 reported by
Diogo Matsubara
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Steve Kowalik |
Bug Description
OOPS-93c9602da4a55064c5b25f5db810f54b IntegrityError: update or delete on table "milestone" violates foreign key constraint "bugtask_
DETAIL: Key (product,
Raised deleting this series: https:/
Related branches
lp:~stevenk/launchpad/delete-milestone-all-bugs
- Curtis Hovey (community): Approve (code)
-
Diff: 130 lines (+43/-11)4 files modifiedlib/lp/bugs/interfaces/bugtasksearch.py (+2/-1)
lib/lp/bugs/model/bugtasksearch.py (+5/-4)
lib/lp/registry/browser/__init__.py (+12/-6)
lib/lp/registry/browser/tests/test_milestone.py (+24/-0)
tags: | added: bugs milestones series |
Changed in launchpad: | |
assignee: | nobody → Steve Kowalik (stevenk) |
status: | Triaged → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I wonder if there is another bug relationship that the delete rules are not aware of. The milestone is removed from the bugs before the milestone is deleted. The code even knows that conjoined masters need to be deleted.
def _deleteMileston e(self, milestone):
self._ unsubscribe_ structure( milestone) ks(milestone) : conjoined_ master is not None:
Store. of(bugtask) .remove( bugtask. conjoined_ master)
bugtask. milestone = None ications( milestone) :
spec. milestone = None
self._ deleteRelease( milestone. product_ release)
milestone. destroySelf( )
"""Delete a milestone and unlink related objects."""
for bugtask in self._getBugtas
if bugtask.
else:
for spec in self._getSpecif