Prevent people being subscribed twice to the same bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
Person merge code should be updated to prevent people being subscribed twice to the same bug. Once that happens, a constraint should be added to prevent this happening again.
There should be a unique constraint on (person, bug) in the BugSubscription table, so that people can't be subscribed twice. We currently have around 190 people subscribe multiple times to the same bug, and that causes a problem when migrating bug subscriptions to the new ACL table. For example, Martin Pool is subscribed twice to bug 96751.
Something like this should delete the duplicates records, while leaving one of them:
DELETE FROM
bugsubscription WHERE id NOT IN (
SELECT MAX(dup.id) FROM
(The equivalent for structural subscriptions is bug 663947.)
Related branches
- Deryck Hodge (community): Approve (code)
- Stuart Bishop (community): Approve (database)
- Robert Collins: Pending (db) requested
-
Diff: 16 lines (+12/-0)1 file modifieddatabase/schema/patch-2207-67-0.sql (+12/-0)
Changed in malone: | |
assignee: | nobody → Brian Murray (brian-murray) |
status: | Triaged → In Progress |
Changed in malone: | |
milestone: | none → 10.08 |
tags: | removed: qa-needstesting |
Changed in malone: | |
status: | Fix Committed → Won't Fix |
Changed in malone: | |
milestone: | 10.08 → none |
summary: |
- BugSubscription table need a constraint to prevent people being - subscribed twice to the same bug + Prevent people being subscribed twice to the same bug |
description: | updated |
Changed in malone: | |
importance: | High → Low |
tags: | removed: story-better-bug-notification |
description: | updated |
We'll get one of the guys working on the better subscriptions/ notifications story to knock this out next week when PQM reopens.
Cheers,
deryck