From b03fc56082401474044c7f92f8786164ca0508a4 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 3 Oct 2008 06:37:16 +0000 Subject: Bug 456919: Implement Bugzilla::Field::Choice->remove_from_db and have editvalues.cgi use it Patch by Max Kanat-Alexander r=bbaetz, a=mkanat --- Bugzilla/Status.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Bugzilla/Status.pm') diff --git a/Bugzilla/Status.pm b/Bugzilla/Status.pm index 565433850..d32b6c354 100644 --- a/Bugzilla/Status.pm +++ b/Bugzilla/Status.pm @@ -73,6 +73,18 @@ sub create { return $self; } +sub remove_from_db { + my $self = shift; + my $dbh = Bugzilla->dbh; + my $id = $self->id; + $dbh->bz_start_transaction(); + $self->SUPER::remove_from_db(); + $dbh->do('DELETE FROM status_workflow + WHERE old_status = ? OR new_status = ?', + undef, $id, $id); + $dbh->bz_commit_transaction(); +} + ############################### ##### Accessors #### ############################### -- cgit v1.2.3-24-g4f1b