From 3a8feb5eb5b33c1814a6c0e16ff2313b161b02a8 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Wed, 7 Apr 2010 01:18:54 +0000 Subject: [PATCH] Bug 557686: PostgreSQL crashes when deleting a custom field of type Date/Time r=mkanat a=LpSolit git-svn-id: svn://10.0.0.236/branches/BUGZILLA-3_6-BRANCH@260161 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/Bugzilla/Field.pm | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 80bc331ddc6..75469fa2420 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7073 \ No newline at end of file +7074 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/Field.pm b/mozilla/webtools/bugzilla/Bugzilla/Field.pm index 2f85120a4db..e7ffcdf6540 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Field.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Field.pm @@ -722,17 +722,13 @@ sub remove_from_db { } else { $bugs_query = "SELECT COUNT(*) FROM bugs WHERE $name IS NOT NULL"; - if ($self->type != FIELD_TYPE_BUG_ID) { + if ($self->type != FIELD_TYPE_BUG_ID && $self->type != FIELD_TYPE_DATETIME) { $bugs_query .= " AND $name != ''"; } # Ignore the default single select value if ($self->type == FIELD_TYPE_SINGLE_SELECT) { $bugs_query .= " AND $name != '---'"; } - # Ignore blank dates. - if ($self->type == FIELD_TYPE_DATETIME) { - $bugs_query .= " AND $name != '00-00-00 00:00:00'"; - } } my $has_bugs = $dbh->selectrow_array($bugs_query);