Merge lp://staging/~gmb/launchpad/team-subscription-opt-out into lp://staging/launchpad/db-devel

Proposed by Graham Binns
Status: Merged
Merged at revision: 10390
Proposed branch: lp://staging/~gmb/launchpad/team-subscription-opt-out
Merge into: lp://staging/launchpad/db-devel
Diff against target: 225 lines (+100/-3)
7 files modified
database/schema/comments.sql (+6/-0)
database/schema/patch-2208-58-0.sql (+25/-0)
database/schema/security.cfg (+2/-0)
lib/lp/bugs/configure.zcml (+11/-0)
lib/lp/bugs/interfaces/bugsubscriptionfilter.py (+20/-1)
lib/lp/bugs/model/bugsubscriptionfilter.py (+33/-2)
lib/lp/registry/model/person.py (+3/-0)
To merge this branch: bzr merge lp://staging/~gmb/launchpad/team-subscription-opt-out
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Gavin Panella (community) code Approve
Robert Collins db Pending
Review via email: mp+55779@code.staging.launchpad.net

Commit message

[r=allenap,stub][ui=none][bug=751173][incr] A BugSubscriptionFilterMute table has been added to the database.

Description of the change

This branch adds a BugSubscriptionFilterMute table to the database and
its associated interface and model to the tree.

The idea behind BugSubscriptionFilterMute is that people should be able
to mute team subscriptions if they want to. The story being that:

 As a member of ~launchpad
 I want to be able to mute emails that I would receive because
 ~launchpad is structurally subscribed to a project
 So that I don't have to read bug mail in which I'm not interested.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

All looks good, but perhaps there ought to be some tests for the basics, like adding to and removing from the store.

review: Approve (code)
Revision history for this message
Stuart Bishop (stub) wrote :

Some discussion on IRC. The following version is approved as patch-2208-58-0.sql:

-- Copyright 2011 Canonical Ltd. This software is licensed under the
-- GNU Affero General Public License version 3 (see the file LICENSE).

SET client_min_messages=ERROR;

-- A table to store subscription mutes in.

CREATE TABLE BugSubscriptionFilterMute (
    person integer REFERENCES Person(id)
        ON DELETE CASCADE NOT NULL,
    filter integer REFERENCES BugSubscriptionFilter(id)
        ON DELETE CASCADE NOT NULL,
    date_created timestamp without time zone
        DEFAULT timezone('UTC'::text, now()) NOT NULL,
    CONSTRAINT bugsubscriptionfiltermute_pkey PRIMARY KEY (person, filter)
);

-- We don't need an index on person, as the primary key index can be used
-- for those lookups. We have an index on just filter, as the bulk of our
-- lookups will be on filter.
CREATE INDEX bugsubscriptionfiltermute__filter__idx
    ON BugSubscriptionFilterMute(filter);

INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 58, 0);

review: Approve (db)

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.

Subscribers

People subscribed via source and target branches

to status/vote changes: