Merge lp:~sinzui/launchpad/dsp-bug-counts-1 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11442 | ||||
Proposed branch: | lp:~sinzui/launchpad/dsp-bug-counts-1 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
232 lines (+59/-14) 5 files modified
database/schema/security.cfg (+19/-11) lib/lp/bugs/doc/bug-heat.txt (+0/-2) lib/lp/bugs/model/bug.py (+3/-1) lib/lp/bugs/tests/test_bugheat.py (+35/-0) lib/lp/registry/model/distributionsourcepackage.py (+2/-0) |
||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/dsp-bug-counts-1 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Deryck Hodge (community) | code | Approve | |
Brad Crittenden (community) | code | Approve | |
Review via email: mp+33257@code.launchpad.net |
Description of the change
This is my branch to fix the DSP bug counts shown on +needs-packaging.
lp:~sinzui/launchpad/dsp-bug-counts-1
Diff size: 90
Launchpad bug:
https:/
Test command: ./bin/test -vv -t test_bugheat
Pre-
Target release: 10.09
Fix the DSP bug counts shown on +needs-packaging
-------
The bug counts shown on +needs-packaging are for all bugs reported against
the DSP. We want to show the open bugs that the user can see when viewing
the DSPs bug page.
The recent fix to exclude closed bugs was not enough to address this issue.
The rules must also ignore duplicate bugs. The call to recalculateBugH
should be added to updateHeat so that bugtargets are updated when their bugs
change.
Rules
-----
* Add condition to exclude duplicate bugs from bug heat cache
calculations.
* Call recalculateBugH
update when their bugs change.
QA
--
* Subscribe to flashplugin-nonfree on staging. Verify the DSP's bug
count goes down.
SELECT bug_count FROM distributionsou
WHERE distribution = 1
AND sourcepackagename in (
Lint
----
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
Test
----
* lib/lp/
* Added a test to verify recalculateBugH
proxies and monkey patching objects is more dangerous.
* Add a duplicate bug to the test setup. The count (2) must not change.
Implementation
--------------
* lib/lp/
* Added a rule to iterate of the bug's tasks and call the
task's recalculateBugH
setHeat works.
* lib/lp/
* Add a condition to ignore duplicate bugs in recalculateBugH
This fix is so simple -- let's hope it does the trick.