Code review comment for lp:~adeuring/launchpad/bug-201015-bug-branch-search

Revision history for this message
Abel Deuring (adeuring) wrote :

This branch is a fix of bug 201015: "Cannot search for bugs with Bazaar branches"

implementation details:

- added an enumeration BugBranchSearch to lp.bugs.interfaces.bugtask
- added a new constructor parameter and a new property "linked_branches" to class BugTaskSearchParams
- code in BugTaskSet.search() to generate an SQL clause for the new search option.
- added a Choice field with BugBranchSearch as a vocabulary to the interface class for the data of the "advanced bug search" form
- told the browser class for the "advanced bug search" to use a radio button widget for the new input filed "search for bugs having [no] linked branches"
- tests of BugTaskSet.search() (via IProduct.searchTasks()) for the new search option
- a short story test for the "presentation" of the new search option

UI note: I wanted to place the new radio buttons close to the existing input field "Show only bugs with patches available", since the new option has a similar purpose. This makes the right column of the table "other options" much longer that the left column, which is aesthetically not very appealing. I considered to move the options "Show only bugs associated with a CVE" and "Show only bugs affecting me" into the left column, but did not do this, because myself would be a bit confused by the changed layout, i.e., I would need a few extra seconds to find the options in their slightly changed location, when doing a bug search...

./bin/test -t bugtask-search.txt
./bin/test -t xx-filter-by-linked-branches.txt

no lint

« Back to merge proposal