Explain why a branch can't be deleted

Bug #133988 reported by Matthew Paul Thomas
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Aaron Bentley

Bug Description

Branches are deletable if they have no subscribers, are not linked to any bugs or blueprints, and have not yet been mirrored.

Where this is true for a branch, the branch page should be specific about it. For example, "This branch cannot be deleted because it is associated with _bug 123456789_." Or, "This branch cannot be deleted because it has been mirrored." This would help people understand what they need to do to (if possible) to make the branch deleteable.

Tags: lp-code ui
Revision history for this message
David Allouche (ddaa) wrote :

This is desirable, but it can easily turn into a maintenance nightmare, since the error message generation would need to be updated every time a new kind of branch link needs to be added.

I would favor some generic mechanism that does not produce error messages of perfect quality but is low-maintenance.

Revision history for this message
Tim Penhey (thumper) wrote :

It shouldn't be too bad.

I recently added a test that will fail when new links to branches are added in the DB but not taken into consideration for branch deletion.

The message could be hooked into that.

My question for Matthew is "where do we show this message"? Should we have the action item "Delete branch" enabled all the time, and then tell the user why it isn't deletable when they click on it?

Changed in launchpad-bazaar:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

While we have the Actions menu, I think that is the best practical solution. (If we did not have the Actions menu, we could put the explanation right next to the Delete button on the branch page.)

Revision history for this message
Martin Pool (mbp) wrote :

I think you should have the action menu always visible, and display a message if you try to click it. This seems to be a common source of confusion like bug 189450, and https://answers.edge.launchpad.net/launchpad-bazaar/+question/23892

Following on from that, in a later release maybe the dialog should say "these bugs are linked to this branch: X, Y, Z; and spec ZZ. do you want to disassociate all of them and delete the branch?"

Revision history for this message
Aaron Bentley (abentley) wrote :

I am currently working on the latter.

Changed in launchpad-bazaar:
assignee: nobody → abentley
Aaron Bentley (abentley)
Changed in launchpad-bazaar:
milestone: none → 1.2.3
status: Confirmed → Fix Committed
Revision history for this message
Aaron Bentley (abentley) wrote :

New branch deletion code landed in 1.2.2

Changed in launchpad-bazaar:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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