Merge lp:~adeuring/launchpad/bug-829074 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Abel Deuring | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 14748 | ||||
Proposed branch: | lp:~adeuring/launchpad/bug-829074 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
574 lines (+408/-94) 3 files modified
lib/lp/bugs/interfaces/bugtask.py (+3/-1) lib/lp/bugs/model/bugtask.py (+186/-91) lib/lp/bugs/tests/test_bugtask_search.py (+219/-2) |
||||
To merge this branch: | bzr merge lp:~adeuring/launchpad/bug-829074 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Richard Harding (community) | code* | Approve | |
Review via email: mp+91302@code.launchpad.net |
Commit message
[r=jcsackett,
Description of the change
This branch is a step to fix bug 829074: Show bugs that are
not known to affect "official" upstream.
Bryce suggests in a comment on the bug to optionally limit the
search to bugtasks targeted to the upstream product.
Daniel points out in another comment that bug 232545 describes
a very similar problem.
On the model side, we can fix both bugs if we allow to optionally
specify an upstream bug target; the search should then return bugs
that have (or do not have) a bug task with the "right properties"
for this target.
An oddity of upstream related searches is that a search with the
parameter pending_
as a possible upstream target, while the other upstream searches
consider only products as upstream targets.
While I don't see much value in using an entire distribtuion
as the new optional upstream target, I added this option
nevertheless for all upstream related searches, just for the sake
of consistency. (To address bug 232545 completely, I'll add the
targets ISourcePackage and IDistributionSo
branch. This should make work easier if a Debian package is the
the upstream of an Ubuntu package; it might also help for the new
derived distributions.)
Implementation:
A new property BugTaskSearchPa
is only relevant if at least one of
BugTaskSearch
BugTaskSearch
BugTaskSearch
BugTaskSearch
If BugTaskSearchPa
clause returned by BugTaskSet.
expression that limits the search to bugtasks for this target.
The file lp/bugs/
single test that is run for all possible bug targets.
A proper setup of an upstream related test can be a bit convoluted
-- see for example the already existing method
test_has_
limited the new tests to the targets SourcePackage and
DistributionSou
with an upstream filter together with a specific upstream target
is probably pointless, and I intend to add option "limit the
upstream search to upstream target X" to source packages and
DSPs as the main search target.
tests:
./bin/test bugs -vvt lp.bugs.
./bin/test bugs -vvt lp.bugs.
./bin/test bugs -vvt lp.bugs.
./bin/test bugs -vvt lp.bugs.
This looks solid from what I can tell.