Merge lp:~sinzui/launchpad/bug-supervisor-labels into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 14440
Proposed branch: lp:~sinzui/launchpad/bug-supervisor-labels
Merge into: lp:launchpad
Diff against target: 0 lines
To merge this branch: bzr merge lp:~sinzui/launchpad/bug-supervisor-labels
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+84343@code.launchpad.net

Description of the change

Fix the structural subscription label wrongly described as 'bug supervisor'.

    Launchpad bug:
        https://bugs.launchpad.net/bugs/262898
        https://bugs.launchpad.net/bugs/503682
        https://bugs.launchpad.net/bugs/562001
    Pre-implementation: gmb

While at UDS-P, the launchpad team was puzzled by the repeated stories
of how Ubuntu and other project locate bugs they are interested. Users
create structural subscription, but then search for bug supervisor.
We know that series and packages do not have bug supervisors so the
search should not succeed. The search does work because of a mis-labeling
of fields in advanced search; bug_supervisor searches structural
subscriptions.

--------------------------------------------------------------------

RULES

My initial thought was to add a structural_subscriber field and
update search to fallback to bug_supervisor to support older API.
I discovered structural_subscriber already exists and it addresses
another bug that is deeper than labels -- Bug #562001.

The bug_supervisor field has a lot of problems:
1. Searching for just bug_supervisor in a bug target will return all or
   no bugs. the field only makes sense in the context of a user or
   team who might work on many projects.
2. Most projects do not explicitly set the field. The default bug_supervisor
   is the maintainer, but that field is not searched.
This is why the field falls back to structural subscriptions.

I decided to update the advanced search for to use the structural_subscriber
field instead, and update the form label to clearly state what is being
searched.
    * Update the search schema to use structural_subscriber.
    * Update the view to setup the structural_subscriber
    * Correct the labels in advanced bug search template.
    * Do not show the field when the target is a package or project series
      because a value leads to all or none results.
    * Fix the title/alt text of links

QA

Bug #503682 Show package report link should say "subscriber" not "supervisor"
    * Visit https://bugs.qastaging.launchpad.net/~sinzui
    * Hover over the Subscribed packages link to show the tooltip.
    * Verify ends with "is a subscriber"

Bug #262898 Inconsistent and incorrect labeling of advanced search page
    * Subscribe to a package if you are not already.
      https://bugs.qastaging.launchpad.net/ubuntu/+source/pocket-lint
      and use the subscribe to bug mail link.
    * Visit https://bugs.qastaging.launchpad.net/ubuntu/+bugs?advanced=1
    * Verify the first fields in the People section are:
      Assignee, Reporter, Commenter, Subscriber,
      Package, or series subscriber
    * Enter your name in the structural subscription field and search
    * Verify the search returns matching bugs.

    * Visit https://bugs.qastaging.launchpad.net/ubuntu/precise/+bugs?advanced=1
    * Verify that the structural subscriber label is
      Package subscriber

    * Visit https://bugs.qastaging.launchpad.net/launchpad/+bugs?advanced=1
    * Verify that the structural subscriber label is
      Series subscriber

    * Visit https://bugs.qastaging.launchpad.net/launchpad-project/+bugs?advanced=1
    * Verify that the structural subscriber label is
      Project or series subscriber

    * Visit https://bugs.qastaging.launchpad.net/~sinzui/+bugs?advanced=1
    * Verify that the structural subscriber label is
      Project, distribution, package, or series subscriber

    * Visit https://bugs.qastaging.launchpad.net/ubuntu/+source/pocket-lint+bugs?advanced=1
    * Verify the structural subscriber field is not shown

    * Visit https://bugs.qastaging.launchpad.net/ubuntu/precise/+source/pocket-lint+bugs?advanced=1
    * Verify the structural subscriber field is not shown

    * Visit https://bugs.qastaging.launchpad.net/launchpad/trunk?advanced=1
    * Verify the structural subscriber field is not shown

Bug #562001 Series structural subscriptions advanced search
    * Visit https://bugs.qastaging.launchpad.net/ubuntu/oneiric
    * Subscribe to the series
    * Visit https://bugs.qastaging.launchpad.net/ubuntu/oneiric/+bugs?advanced=1
    * Enter your name in the structural subscription field and search
    * Verify the result contains matches.

LINT

    lib/lp/bugs/browser/bugtask.py
    lib/lp/bugs/browser/tests/test_bugtask.py
    lib/lp/bugs/interfaces/bugtask.py
    lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt
    lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt
    lib/lp/bugs/templates/bugtask-macros-tableview.pt
    lib/lp/registry/browser/person.py

^ Lint does not like the two stories I can clean this up after the review.

TEST

    ./bin/test -vvc -t uctural lp.bugs.browser.tests.test_bugtask
    ./bin/test -vvc -t advanced-search -t advanced-peop lp.bugs.tests.test_doc

IMPLEMENTATION

Updated the advanced search interface to`use the structural_subscriber
field instead instead of the bug_supervisor field.
    lib/lp/bugs/interfaces/bugtask.py
    lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt

Updated the base search view to use the structural_subscriber field.
Updated the base search view to make an informative field label for the
page and use that label to determine if the widget should be shown.
Updated the template to use the new label and fixed the inconsistent labels.
Removed a error test from xx-advanced-people-filters because it is already
tested is a unittest.
    lib/lp/bugs/browser/bugtask.py
    lib/lp/bugs/browser/tests/test_bugtask.py
    lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt
    lib/lp/bugs/templates/bugtask-macros-tableview.pt

Fix the link wording summary shown in the tooltip.
    lib/lp/registry/browser/person.py

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

The branch looks good. The MP write-up is terrific.

The only small thing I noticed was that the indentation in
bugtask-macros-tableview.pt page template isn't self-consistent (tags
continued on a second line are inconsistent). However that's a
pre-existing condition; the changed lines are mostly just moved from
another point in the file.

review: Approve (code)

Preview Diff

Empty