summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-05-26 08:01:21 +0200
committerlpsolit%gmail.com <>2007-05-26 08:01:21 +0200
commit004d9a78bc692f024f95363966be1d959b59cb93 (patch)
treea762c0b99e130d3a4aeffd141bb8b136eb00ff80 /contrib
parentceaa62caa90f39de04c5649c70d7902d58b1f3ed (diff)
downloadbugzilla-004d9a78bc692f024f95363966be1d959b59cb93.tar.gz
bugzilla-004d9a78bc692f024f95363966be1d959b59cb93.tar.xz
Bug 381737: Unable to get legal values of custom fields via XML-RPC - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/bz_webservice_demo.pl19
1 files changed, 18 insertions, 1 deletions
diff --git a/contrib/bz_webservice_demo.pl b/contrib/bz_webservice_demo.pl
index aa92d1dd9..d21405d4a 100755
--- a/contrib/bz_webservice_demo.pl
+++ b/contrib/bz_webservice_demo.pl
@@ -49,6 +49,7 @@ my $Bugzilla_remember;
my $bug_id;
my $product_name;
my $create_file_name;
+my $legal_field_values;
GetOptions('help|h|?' => \$help,
'uri=s' => \$Bugzilla_uri,
@@ -57,7 +58,8 @@ GetOptions('help|h|?' => \$help,
'rememberlogin!' => \$Bugzilla_remember,
'bug_id:s' => \$bug_id,
'product_name:s' => \$product_name,
- 'create:s' => \$create_file_name
+ 'create:s' => \$create_file_name,
+ 'field:s' => \$legal_field_values
) or pod2usage({'-verbose' => 0, '-exitval' => 1});
=head1 OPTIONS
@@ -269,6 +271,21 @@ if ($create_file_name) {
}
+=head2 Getting Legal Field Values
+
+Call C<Bug.legal_values> with the name of the field (including custom
+select fields). The call will return a reference to an array with the
+list of legal values for this field.
+
+=cut
+
+if ($legal_field_values) {
+ $soapresult = $proxy->call('Bug.legal_values', {field => $legal_field_values} );
+ _die_on_fault($soapresult);
+ $result = $soapresult->result;
+
+ print join("\n", @{$result->{values}}) . "\n";
+}
=head1 NOTES