Merge lp://staging/~allenap/launchpad/bugnomination-timeout-bug-874250-preload-email into lp://staging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Gavin Panella | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 14638 | ||||
Proposed branch: | lp://staging/~allenap/launchpad/bugnomination-timeout-bug-874250-preload-email | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
1541 lines (+706/-257) 9 files modified
lib/lp/bugs/configure.zcml (+13/-0) lib/lp/bugs/doc/bugsubscription.txt (+4/-4) lib/lp/bugs/interfaces/bug.py (+3/-2) lib/lp/bugs/interfaces/bugtask.py (+1/-1) lib/lp/bugs/model/bug.py (+180/-100) lib/lp/bugs/model/structuralsubscription.py (+84/-41) lib/lp/bugs/model/tests/test_bug.py (+82/-8) lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py (+239/-99) lib/lp/bugs/tests/test_structuralsubscription.py (+100/-2) |
||||
To merge this branch: | bzr merge lp://staging/~allenap/launchpad/bugnomination-timeout-bug-874250-preload-email | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email:
|
Commit message
Load preferredemail when calculating bug subscribers of any kind via BugSubscription
Description of the change
This branch is long, but is actually quite readable, I think :)
One big problem when updating bugs is sending notifications to
subscribers. It looks like preferred email addresses are being loaded
one by one (though I started this branch long enough ago that the
details have faded).
In getting email addresses preloaded I updated BugSubscription
fixed some issues with it, and gotten get_also_
using it.
I think BSI is now a fairly good and comprehensive foundation for any
bug subscription calculation. It may not do everything in the minimum
number of queries possible, but it's does everything in a constant
number of queries, and makes it easy for code that uses it to also do
so.
There are still methods in IBug (and probably elsewhere) that could be
refactored to use BSI more directly, but I'll leave that for another
time.
The changes:
- Updates BugSubscription
- Adds all_direct_
direct_
properties.
- Adds support for returning subscription info for only a single
bugtask as well as all bugtasks of the given bug.
- Adds forLevel() and forTask() methods.
- When loading Person records, load preferred email information too.
- Updates get_also_
- Use BugSubscriptionInfo more heavily.
- Adds tests around performance of this function when passed a
recipients argument. This was previously poor (potato potato).
- Updates structural subscriptions:
Split get_structural_
get_structura
which both back onto query_structura
function. This supports the changes to BugSubscriptionInfo and also
makes the implementation cleaner.
Fwiw, passes in devel:
Tests started at approximately 2012-01-03 16:07:06.335715 //bazaar. launchpad. net/~allenap/ launchpad/ bugnomination- timeout-bug-874250-preload-email r14523 //bazaar. launchpad. net/~launchpad- pqm/launchpad/ devel/ r14623
Source: bzr+ssh:
Target: bzr+ssh:
17326 tests run in 4:21:55.682084, 0 failures, 0 errors