launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05356
[Merge] lp:~rvb/launchpad/combinator-bug-881144 into lp:launchpad
Raphaël Badin has proposed merging lp:~rvb/launchpad/combinator-bug-881144 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #881144 in Launchpad itself: "field.tags_combinator=ALL gives same results as with ANY when searching all bug reports"
https://bugs.launchpad.net/launchpad/+bug/881144
For more details, see:
https://code.launchpad.net/~rvb/launchpad/combinator-bug-881144/+merge/80911
This branch fixes the schema used by BugsBugTaskSearchListingView (IFrontPageBugTaskSearch). It now uses IBugTaskSearch as its base class so that the widget 'tags_combinator' is now present. Before the change, the widget was not in the view class, the query param was not processed and thus the default value for 'tags_combinator' (ANY) was used.
= Tests =
Okay, I have to admit I modified an existing doctest:
./bin/test -vvc -t xx-searching-by-tags.txt
= Q/A =
Make sure that field.tags_combinator=ALL works (i.e. the two following bug listing should not be identical)
https://bugs.launchpad.net/bugs/+bugs?field.tag=lt-snowball+primary-video-out+linaro-ubuntu&field.tags_combinator=ALL
https://bugs.launchpad.net/bugs/+bugs?field.tag=lt-snowball+primary-video-out+linaro-ubuntu&field.tags_combinator=ANY
--
https://code.launchpad.net/~rvb/launchpad/combinator-bug-881144/+merge/80911
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/launchpad/combinator-bug-881144 into lp:launchpad.
=== modified file 'lib/lp/bugs/interfaces/bugtask.py'
--- lib/lp/bugs/interfaces/bugtask.py 2011-10-20 19:14:32 +0000
+++ lib/lp/bugs/interfaces/bugtask.py 2011-11-01 14:41:33 +0000
@@ -1096,7 +1096,7 @@
required=False)
-class IFrontPageBugTaskSearch(IBugTaskSearchBase):
+class IFrontPageBugTaskSearch(IBugTaskSearch):
"""Additional search options for the front page of bugs."""
scope = Choice(
title=u"Search Scope", required=False,
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt 2011-01-07 00:42:30 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt 2011-11-01 14:41:33 +0000
@@ -1,4 +1,5 @@
-= Searching by tags =
+Searching by tags
+=================
The advanced bug search allows searching for bugs by the tags they are
tagged with. It is possible to search either inclusively (for bugs
@@ -33,6 +34,19 @@
>>> logout()
+We go to the global bug search page and search for bugs with all the tags.
+Only 'test bug a' is returned.
+
+ >>> anon_browser.open('http://bugs.launchpad.dev/bugs/+bugs?advanced=1')
+ >>> anon_browser.getControl(
+ ... name='field.tag').value = 'test-tag-1 test-tag-2'
+ >>> anon_browser.getControl(name='field.tags_combinator').value = ['ALL']
+ >>> anon_browser.getControl('Search', index=1).click()
+ >>> print extract_text(
+ ... find_tag_by_id(anon_browser.contents, 'buglisting'))
+ Summary In Importance Status Heat
+ 16 test bug a Mozilla Firefox Undecided New
+
We go to the bug search page and search for bugs with any of the tags.
Both bugs are returned.