summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorTiago Mello <timello@gmail.com>2010-10-24 23:21:00 +0200
committerTiago Mello <timello@gmail.com>2010-10-24 23:21:00 +0200
commit1f6214a9f98c9f419222ee7e7b6fdcb7126a485b (patch)
treebe3fbc76345917dc9ef44ebed3f3c91d72d3035f /Bugzilla/WebService
parent1733aaa0eabac04f1b1cb75973a81eb634053892 (diff)
downloadbugzilla-1f6214a9f98c9f419222ee7e7b6fdcb7126a485b.tar.gz
bugzilla-1f6214a9f98c9f419222ee7e7b6fdcb7126a485b.tar.xz
Bug 598549: Fixes the visibility_values in the WS Bug.fields method.
r/a=mkanat
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Bug.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 45395ae1e..8477e33b2 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -109,9 +109,9 @@ sub fields {
my @fields_out;
foreach my $field (@fields) {
- my $visibility_field = $field->visibility_field
+ my $visibility_field = $field->visibility_field
? $field->visibility_field->name : undef;
- my $vis_value = $field->visibility_value;
+ my $vis_values = $field->visibility_values;
my $value_field = $field->value_field
? $field->value_field->name : undef;
@@ -135,10 +135,8 @@ sub fields {
display_name => $self->type('string', $field->description),
is_on_bug_entry => $self->type('boolean', $field->enter_bug),
visibility_field => $self->type('string', $visibility_field),
- visibility_values => [
- defined $vis_value ? $self->type('string', $vis_value->name)
- : ()
- ],
+ visibility_values =>
+ [ map { $self->type('string', $_->name) } @$vis_values ],
);
if ($has_values) {
$field_data{value_field} = $self->type('string', $value_field);