want sensible suggestions when choosing a branch to link to a bug

Bug #396523 reported by Stuart Langridge on 2009-07-07
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Low
Unassigned

Bug Description

The UI to link a related branch to a bug is hilariously unusable, in my experience. I am presented with a text box and no indication what should be entered into that textbox (a full HTTP URL of the branch to link? an lp:~whoever/project/branch string? A ~whoever/project/branch string?), and a "Choose" link. The Choose link presents me with a search box. Searching in the search box doesn't seem to work very well (for example, if trying to find my (~sil) branches on the bindwood project, "~sil/bindwood" doesn't find anything, "~sil bindwood" doesn't find anything, and "sil bindwood" doesn't find anything). I suggest that when linking branches, I am likely to want to choose branches from the following lists, in descending order of preference:

1. Branches by me, in the same project as the bug, which have not been merged, in descending order of most-recently-pushed
2. Branches by anyone, in the same project as the bug, which have not been merged
3. Branches by anyone, in the same project as the bug, which have been merged
4. Branches by anyone in any project

It seems rare to me that I would be as likely to link (a) a branch by me in this project which is unmerged and (b) a branch by someone else in an unrelated project which was merged three years ago, but the current UI gives these equal weight.

These options could be implemented as "tabs" in the existing "choose" popup, or, better still, the existing textbox could be replaced with the Choose UI. Since directly entering a branch may still be useful, a fifth tab should allow for that. So, proposed new UI:

1. Branches by me, in the same project as the bug, which have not been merged, in descending order of most-recently-pushed
+----------------------------------------------+
| Choose a branchׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
+-------+---------+---------+-------+----------+
| Mineׄ | Othersׄ | Mergedׄ | ׄAnyׄ | Specific |
+ׄׄׄׄׄׄׄ+---------+---------+-------+----------+
| Your unmerged branches for THISPROJECTׄׄׄׄׄׄׄ|
| ~sil/thisproject/branchname1ׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
| ~sil/thisproject/branchname2ׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
| ~sil/thisproject/branchname3ׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
+----------------------------------------------+

2. Branches by anyone, in the same project as the bug, which have not been merged
+----------------------------------------------+
| Choose a branchׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
+-------+---------+---------+-------+----------+
| Mineׄ | Othersׄ | Mergedׄ | ׄAnyׄ | Specific |
+-------+ׄׄׄׄׄׄׄׄׄ+---------+-------+----------+
| Everyone's unmerged branches for THISPROJECT |
| ~somedude/thisproject/code-to-do-stuffׄׄׄׄׄׄ |
| ~otherdude/thisproject/whateverׄׄׄׄׄׄׄׄׄׄׄׄׄ |
| ~otherdude/thisproject/more-codeׄׄׄׄׄׄׄׄׄׄׄׄ |
+----------------------------------------------+

3. Branches by anyone, in the same project as the bug, which have been merged
+----------------------------------------------+
| Choose a branchׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
+-------+---------+---------+-------+----------+
| Mineׄ | Othersׄ | Mergedׄ | ׄAnyׄ | Specific |
+-------+---------+ׄׄׄׄׄׄׄׄׄ+-------+----------+
| Everyone's merged branches for THISPROJECTׄׄ |
| ~somedude/thisproject/wrote-this-ages-agoׄׄׄ |
| ~otherdude/thisproject/january-2007ׄׄׄׄׄׄׄׄׄ |
+----------------------------------------------+

4. Branches by anyone in any project
+----------------------------------------------+
| Choose a branchׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
+-------+---------+---------+-------+----------+
| Mineׄ | Othersׄ | Mergedׄ | ׄAnyׄ | Specific |
+-------+---------+---------+ׄׄׄׄׄׄׄ+----------+
| Search for a branchׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ |
| [ׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ] |
|ׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
+----------------------------------------------+

Note that the search here should be changed to do substring searches on full branch name, and AND together tokens separated by whitespace in the query (so searching for "sil bindwood" would find a branch named lp:~sil/bindwood/whatever).

5. Specific branch by name/URL
+----------------------------------------------+
| Choose a branchׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
+-------+---------+---------+-------+----------+
| Mineׄ | Othersׄ | Mergedׄ | ׄAnyׄ | Specific |
+-------+---------+---------+-------+ׄׄׄׄׄׄׄׄׄׄ+
| Enter a specific branchׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ |
| (URL, lp:~person/project/branch, orׄׄׄׄׄׄׄׄׄ |
| ׄׄ~person/project/branch)ׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ |
| [ׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ] |
|ׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄׄ|
+----------------------------------------------+

Stuart Langridge (sil) on 2009-07-07
description: updated
description: updated
description: updated
Stuart Langridge (sil) on 2009-07-07
description: updated
description: updated
Stuart Langridge (sil) wrote :

Note also that my suggestion is rather maximal. If making certain options more awkward is allowed, then I'd suggest:

keep the "Mine" and "Others" tabs
collapse "Merged", "Any", and "Specific" into one search box which either takes a full URL/lp:~whatever/~whatever designation *or* a search query and intelligently identifies which is meant and Does The Right Thing (links the specified branch or shows matching search results).

This would leave only three tabs, which is potentially easier to deal with.

(My workflow is to link branches to bugs when I start working on the branch, or at worst when I push the branch and request merging to trunk. If other people tend to link up branches to bugs well after those branches hit trunk, then maybe the "Merged" tab should stay too.)

tags: added: usability
affects: launchpad → launchpad-code
tags: added: bug-branch-links
Martin Pool (mbp) wrote :

You clearly have too much time on your hands :-)

Seriously, I agree with your suggestions, and I want to add an item 0 to that list: branches containing that bug number in the URL, preferably in this project and preferably owned by me. If this was implemented 90+% of my branches could be linked with no typing just by accepting the default. Feature branches and putting the number in the url are good practices.

summary: - "Link a related branch" UI is impossibly horrid to use
+ want sensible suggestions when choosing a branch to link to a bug
Stuart Langridge (sil) wrote :

Martin,

I decided that writing this up was a more constructive use of my somewhat limited time than (a) screaming anger every time I have to use the UI and (b) complaining at LP hackers every time I meet them for beer :-)

The idea of putting bug numbers in a branch name is an interesting one that I hadn't come across. Adding your suggestion would encourage people to follow that best practice since it makes their life easier later. (For extra credit, if this happens, I might write a Greasemonkey script that gives you a "branch trunk to fix this bug" button on LP bug pages...)

Stuart Langridge (sil) wrote :

Attached: Greasemonkey script that implements roughly the above proposed UI. It blithely uses Firefox 3.5 features, so you'll need 3.5 to test it, and there's no CSS styling of anything done, and it does everything the long way rather than using YUI, but it should at least give an indication of how things should work, and it stops me screaming at things. :-)

Jonathan Lange (jml) wrote :

Related to bug 372591 and bug 388398, since part of the problem is the underlying sucktitude of the way we search for branches at all (what we fondly call the 'branch vocabulary').

I believe there are also grand plans to improve the widget we use for vocabularies more generally. I don't have bug numbers for those, but perhaps beuno has a flash video or something :P

Your proposed UI looks to me to be excellent. Like many excellent looking UIs, it also promises to be rather fiddly to implement. Oh well.

Thanks so much for filing such a well thought out bug report, and for providing a working prototype! It shames me that you got around to doing that before we even triaged the bug. We really need to get better at fixing bugs that cause users pain.

Also, I hope that you'll start contributing to Launchpad once it's open sourced. :)

jml

PS. I'll listen to any number of bug reports as long as you're the one paying for the beer.

Changed in launchpad-code:
importance: Undecided → Medium
status: New → Triaged
Tim Penhey (thumper) wrote :

I'm going to look into this as part of my HCI assignment :-)

AJAX FTW!

Changed in launchpad-code:
assignee: nobody → Tim Penhey (thumper)
Martin Pool (mbp) wrote :

> PS. I'll listen to any number of bug reports as long as you're the one paying for the beer.

:-)

I need an updated t-shirt saying something like "warm beer, cool features"

Stuart Langridge (sil) wrote :

Slightly updated version of my Greasemonkey script to provide decent UI here. It now emboldens branch names which contain the bug number, which sort of handles Martin Pool's request :)

Stuart Langridge (sil) wrote :

Now that Launchpad shows the "link a related branch" text entry in a DOM popup rather than on a separate page, this has actually got worse; the UI is still just as unusable as before but now my Greasemonkey script doesn't work. Sadface.

Gavin Panella (allenap) wrote :

Note that it's still possible to use @sil's script by middle-clicking (open in a new tab) the "Link a related branch" link.

Gavin Panella (allenap) wrote :

In the description, where it says "in the same project as the bug", it could be read as "in the same project as the bug, or in a sibling project within the project's group", with branches in siblings being sorted later perhaps.

This might only be a problem for Launchpad development, where bugs are often filed (or refiled) against "malone" (or any of several other projects), but all branches are uploaded to "launchpad". The above behaviour might be useful for Launchpad developers, but others might find such "sibling" behaviour annoying.

In any case, @mbp's suggestion for bug numbers in the branch name would work >90% of the time for me.

Tim Penhey (thumper) on 2011-04-26
Changed in launchpad:
assignee: Tim Penhey (thumper) → nobody
Curtis Hovey (sinzui) on 2011-05-25
Changed in launchpad:
importance: Medium → Low
Martin Pool (mbp) wrote :

fixed at the Dublin rally!

Changed in launchpad:
assignee: nobody → Martin Pool (mbp)
assignee: Martin Pool (mbp) → Benji York (benji)
status: Triaged → In Progress
Stuart Langridge (sil) wrote :

ahem. The rally just suggests a branch with the bug number in it by default, no? Which is not quite fixing this entirely, although it's a massive and excellent step :)

Martin Pool (mbp) wrote :

Ah, that's true, i was a bit enthusiastic in looking for the previously-filed bug corresponding to this feature, and was going off the comments that matching the number would be a good solution most of the time.

Perhaps we should either split out a bug for that, or conversely mark this closed and then add other specific complaints about cases where the bug number is not enough.

Benji York (benji) wrote :

I filed bug 809508 to track my work on the aforementioned Dublin approach.

Changed in launchpad:
status: In Progress → Triaged
Benji York (benji) on 2011-12-23
Changed in launchpad:
assignee: Benji York (benji) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers