Merge lp:~jcsackett/launchpad/bugs-in-deactivated-pillars into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | j.c.sackett | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12473 | ||||
Proposed branch: | lp:~jcsackett/launchpad/bugs-in-deactivated-pillars | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
139 lines (+69/-8) 2 files modified
lib/lp/bugs/model/bugtask.py (+30/-5) lib/lp/bugs/tests/test_bugtask_search.py (+39/-3) |
||||
To merge this branch: | bzr merge lp:~jcsackett/launchpad/bugs-in-deactivated-pillars | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Launchpad code reviewers | Pending | ||
Review via email: mp+50000@code.launchpad.net |
Commit message
[r=lifeless][bug=632847] Removes deactivated product bugtasks from bug search listings.
Description of the change
Summary
=======
Per bug 632847, bugtasks for deactivated projects can show up in search results. Users clicking on links for these bugtasks then get a 404. So for those searches that can return arbitrary product related bugtasks, we strip out the deactivated products.
This is the second attempt at fixing this bug; the previous branch had to be rolled back as it introduced performance issues. (See https:/
Proposed
========
Remove the bugtasks with deactivated products when a search would return arbitrary product results (e.g. we're not searching for bugtasks on a particular product, distribution, &c).
Preimplementation
=================
Spoke with Deryck Hodge and Curtis Hovey on the intial branch.
Spoke with Robert Collins regarding performance issues in the previous branch that was rolled back.
Implementation
==============
A check in buildQuery in the bugtask search system determines if the search can return arbitrary products; if it can, it adds a Left Join to Product and a where clause to filter out bugtasks targeting a deactivated product.
Tests
=====
bin/test -t test_buglisting
Demo & QA
=========
Using the link provided in the bug (though switch to qastaging). You should no longer see the problematic bugtask in the search result, but should see the other bugtask for the bug in question.
Lint
====
make lint output:
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
./lib/lp/
2487: E301 expected 1 blank line, found 0
In https:/ /bugs.launchpad .net/launchpad/ +bug/421901/ comments/ 14 we had a more complex join - we enforce the active flag in the join, which reduces the data brought into intermediary tables. Was there a particular reason for eliding that aspect here?