diff options
author | Matt Tyson <mtyson@redhat.com> | 2013-02-17 02:16:55 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2013-02-17 02:16:55 +0100 |
commit | d6bcb48dc26f6c3691643093172fdaab53e99003 (patch) | |
tree | e281670505d1af32f766feb302d0c76b27a8df01 /Bugzilla | |
parent | 331fee414c98ff0eda46173bf2ebb700295461e7 (diff) | |
download | bugs-d6bcb48dc26f6c3691643093172fdaab53e99003.tar bugs-d6bcb48dc26f6c3691643093172fdaab53e99003.tar.gz bugs-d6bcb48dc26f6c3691643093172fdaab53e99003.tar.bz2 bugs-d6bcb48dc26f6c3691643093172fdaab53e99003.tar.xz bugs-d6bcb48dc26f6c3691643093172fdaab53e99003.zip |
Bug 839950: Cannot search by Change History on multi-select fields
r/a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Bug.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index b3f782002..703ef1bb6 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3770,9 +3770,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; @@ -3780,7 +3784,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); } return @fields; |