diff options
Diffstat (limited to 'Bugzilla/Status.pm')
-rw-r--r-- | Bugzilla/Status.pm | 12 |
1 files changed, 12 insertions, 0 deletions
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 #### ############################### |