Merge lp://staging/~danilo/launchpad/remove-primary-duplicate-reason into lp://staging/launchpad

Proposed by Данило Шеган
Status: Merged
Approved by: Данило Шеган
Approved revision: no longer in the source branch.
Merged at revision: 12887
Proposed branch: lp://staging/~danilo/launchpad/remove-primary-duplicate-reason
Merge into: lp://staging/launchpad
Diff against target: 142 lines (+21/-31)
2 files modified
lib/lp/bugs/model/personsubscriptioninfo.py (+13/-11)
lib/lp/bugs/model/tests/test_personsubscriptioninfo.py (+8/-20)
To merge this branch: bzr merge lp://staging/~danilo/launchpad/remove-primary-duplicate-reason
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+57839@code.staging.launchpad.net

Commit message

[r=adeuring][bug=761596] Stop treating bug duplication as symmetric for the purposes of bug subscription descriptions. It's not.

Description of the change

= Remove symmetric handling of duplicates =

Atm, the code assumes that bug duplication is a symmetric process as far as email notifications go. Since that's not the case (I double-checked that), we need to stop treating it as such.

== Implementation details ==

Remove the bug join condition that fetches the primary bug for a duplicate. The condition list was Or()d together.

The test has been updated to confirm this is the case.

Lint fixes in a separate commit, getting pushed after review :)

== Tests ==

bin/test -cvvt PersonSubscriptionInfo.*duplicate

== Demo and Q/A ==

  1. Turn on 'malone.advanced-structural-subscriptions.enabled' feature flag
  2. Mark a bug https://bugs.launchpad.dev/firefox/+bug/6 as duplicate of https://bugs.launchpad.dev/firefox/+bug/5
  3. Subscribe to bug 5
  4. Make sure the https://bugs.launchpad.dev/firefox/+bug/6/+subscriptions doesn't say how bug 5 is a duplicate of bug 6

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/bugs/model/personsubscriptioninfo.py
  lib/lp/bugs/model/tests/test_personsubscriptioninfo.py

./lib/lp/bugs/model/personsubscriptioninfo.py
     119: E501 line too long (80 characters)
     257: E301 expected 1 blank line, found 0
     267: E301 expected 1 blank line, found 0
     274: E301 expected 1 blank line, found 0
     305: E202 whitespace before ')'
     313: E202 whitespace before ')'
     119: Line exceeds 78 characters.
./lib/lp/bugs/model/tests/test_personsubscriptioninfo.py
      12: 'searchbuilder' imported but unused
      29: 'anonymous_logged_in' imported but unused
       8: 'Store' imported but unused
      16: 'BugTaskStatus' imported but unused
      10: 'ProxyFactory' imported but unused
       9: 'Unauthorized' imported but unused
      16: 'BugTaskImportance' imported but unused
      29: 'login_person' imported but unused
      26: 'BugSubscriptionFilter' imported but unused
      13: 'IStore' imported but unused
      37: E302 expected 2 blank lines, found 1

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

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.