summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-02-19 06:48:43 +0100
committerByron Jones <bjones@mozilla.com>2013-02-19 06:48:43 +0100
commit9dcee80b83ccdc0b6262e271a5d0acc876457f42 (patch)
tree08378ab6e5c6129c6060a302a4e79be6e62b30e4 /Bugzilla/Bug.pm
parent4e91e1aec2ed4f4798df84b86abde88b260dc3d5 (diff)
parente3d3e70335676218800c30a3761c32f7c1887e39 (diff)
downloadbugzilla-9dcee80b83ccdc0b6262e271a5d0acc876457f42.tar.gz
bugzilla-9dcee80b83ccdc0b6262e271a5d0acc876457f42.tar.xz
merge with bugzilla/4.2
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 760486be6..3d5ebf553 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -3705,9 +3705,13 @@ sub bug_alias_to_id {
# Subroutines
#####################################################################
-# Represents which fields from the bugs table are handled by process_bug.cgi.
+# Returns a list of currently active and editable bug fields,
+# including multi-select fields.
sub editable_bug_fields {
my @fields = Bugzilla->dbh->bz_table_columns('bugs');
+ # Add multi-select fields
+ push(@fields, map { $_->name } @{Bugzilla->fields({obsolete => 0,
+ type => FIELD_TYPE_MULTI_SELECT})});
# Obsolete custom fields are not editable.
my @obsolete_fields = @{ Bugzilla->fields({obsolete => 1, custom => 1}) };
@obsolete_fields = map { $_->name } @obsolete_fields;
@@ -3715,7 +3719,7 @@ sub editable_bug_fields {
"lastdiffed", @obsolete_fields)
{
my $location = firstidx { $_ eq $remove } @fields;
- # Custom multi-select fields are not stored in the bugs table.
+ # Ensure field exists before attempting to remove it.
splice(@fields, $location, 1) if ($location > -1);
}
# Sorted because the old @::log_columns variable, which this replaces,