Merge lp:~deryck/launchpad/hot-bugs-list-515232 into lp:launchpad
Proposed by
Deryck Hodge
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~deryck/launchpad/hot-bugs-list-515232 |
Merge into: | lp:launchpad |
Diff against target: |
256 lines (+104/-37) 4 files modified
lib/lp/bugs/browser/bugtarget.py (+24/-0) lib/lp/bugs/browser/bugtask.py (+9/-14) lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt (+61/-18) lib/lp/bugs/templates/bugtarget-bugs.pt (+10/-5) |
To merge this branch: | bzr merge lp:~deryck/launchpad/hot-bugs-list-515232 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+19025@code.launchpad.net |
Commit message
Create a true hot bugs list for a bugs home page. Also, provide a link to the full list of hot bugs. (The original version of this was backed out for performance reasons.)
To post a comment you must log in.
This branch converts a bugtask.py's hot_bugtasks method to a hot_bugs
method on a bug target. The effect of this change is that the bugs home
page for a project will no longer feature the most recently changed
bugs. The home page will now show the top 10 hottest bugs.
This also fixes bug 442170, bug 77701, and bug 515232.
== Implementation details ==
One version of this landed during week 3 last cycle, but the branch was
reverted last minute due to timeout issues. After much playing on
staging with queries (and after talking with Björn), I feel confident
setting a limit and not doing a secondary sort on -datecreated will fix
the timeouts we had.
I also took the opportunity to clean up some lint and add a link to the
rest of the hot bugs list. Because I added this link, I needed a way to
check that more than 10 hot bugs exist. I made the hot_bugs list a dict
with a flag for has_more_bugs, which allows doing this in one method,
too, avoiding having to look up the hot bugs list again.
== Tests ==
Test with:
./bin/test -cvvt xx-product- bugs-page. txt
== Demo and Q/A ==
To QA, visit any bugs home page (e.g. /bugs.launchpad .net/malone/) and confirm that the 10 bugs shown
https:/
are the top ten when you follow the link to the full hot bugs list.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: bugs/browser/ bugtarget. py bugs/browser/ bugtask. py bugs/templates/ bugtarget- bugs.pt bugs/stories/ bugs/xx- product- bugs-page. txt
lib/lp/
lib/lp/
lib/lp/
lib/lp/