Commit 14d81133 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 410660: Updating a bug fails if there is a multi-select custom field - Patch…

Bug 410660: Updating a bug fails if there is a multi-select custom field - Patch by Ronaldo Maia <romaia@async.com.br> r/a=LpSolit
parent bc799da1
...@@ -1406,8 +1406,15 @@ sub _set_global_validator { ...@@ -1406,8 +1406,15 @@ sub _set_global_validator {
my ($self, $value, $field) = @_; my ($self, $value, $field) = @_;
my $current = $self->$field; my $current = $self->$field;
my $privs; my $privs;
$current = $current->id if ref $current && $current->isa('Bugzilla::Object');
$value = $value->id if ref $value && $value->isa('Bugzilla::Object'); if (ref $current && ref($current) ne 'ARRAY'
&& $current->isa('Bugzilla::Object')) {
$current = $current->id ;
}
if (ref $value && ref($value) ne 'ARRAY'
&& $value->isa('Bugzilla::Object')) {
$value = $value->id ;
}
my $can = $self->check_can_change_field($field, $current, $value, \$privs); my $can = $self->check_can_change_field($field, $current, $value, \$privs);
if (!$can) { if (!$can) {
if ($field eq 'assigned_to' || $field eq 'qa_contact') { if ($field eq 'assigned_to' || $field eq 'qa_contact') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment