From: Matt Tyson Date: Sun, 17 Feb 2013 01:18:02 +0000 (+0100) Subject: Bug 839950: Cannot search by Change History on multi-select fields X-Git-Tag: bugzilla-4.4rc2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f49804084074be5bf37b1c588e2efce0c832b47;p=thirdparty%2Fbugzilla.git Bug 839950: Cannot search by Change History on multi-select fields r/a=LpSolit --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 7d122d7ee2..817bdf3f65 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3740,9 +3740,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; @@ -3750,7 +3754,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,