summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Field.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Field.pm')
-rw-r--r--Bugzilla/Field.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm
index 15f84e75f..31ace90e0 100644
--- a/Bugzilla/Field.pm
+++ b/Bugzilla/Field.pm
@@ -821,8 +821,10 @@ sub remove_from_db {
$bugs_query = "SELECT COUNT(*) FROM bug_$name";
}
else {
- $bugs_query = "SELECT COUNT(*) FROM bugs WHERE $name IS NOT NULL
- AND $name != ''";
+ $bugs_query = "SELECT COUNT(*) FROM bugs WHERE $name IS NOT NULL";
+ if ($self->type != FIELD_TYPE_BUG_ID) {
+ $bugs_query .= " AND $name != ''";
+ }
# Ignore the default single select value
if ($self->type == FIELD_TYPE_SINGLE_SELECT) {
$bugs_query .= " AND $name != '---'";