lp: link targets should be better detected

Bug #363085 reported by Michael B. Trausch
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Jonathan Lange

Bug Description

In bug reports, lp: links link to a branch unconditionally. However, if a bzr command line is pasted into a bug as is the case with bug 363082, this is not desirable. Launchpad should check lp: links to see:

  * Does it link to a valid branch? Yes, then link it there. No? Then:
  * Does it link to a valid bug report? Yes, then link it there. No? Then:
  * Do not link it at all.

So, the bzr command line in bug 363082 should link to bug 315707, not to an unknown and non-existent branch named 315707.

Possibly better yet, a lp: target should check for linking to a bug before linking to a branch, since I should think that a branch name of all numbers like a bug report makes little sense.

Tags: lp-code
Revision history for this message
Jonathan Lange (jml) wrote :

You're right: if the thing following lp: is a number, then it should be linked to a bug report, not a branch. Easily done.

affects: launchpad → launchpad-bazaar
Changed in launchpad-bazaar:
assignee: nobody → Jonathan Lange (jml)
importance: Undecided → Low
status: New → Triaged
milestone: none → 2.2.5
Jonathan Lange (jml)
Changed in launchpad-code:
status: Triaged → In Progress
Jonathan Lange (jml)
Changed in launchpad-code:
status: In Progress → Fix Committed
Jonathan Lange (jml)
Changed in launchpad-code:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.