setting a flag via bugzilla's xlmrpc interface?

Christian Iseli Christian.Iseli at licr.org
Tue Mar 13 08:48:53 UTC 2007


On Mon, 12 Mar 2007 14:12:19 -0700, Chris Weyl wrote:
> * how to get/set flags using it?

For getting a flag, I'm not sure.  Examples to detect if a flag has a
given value can be found in my scripts in CVS:
http://cvs.fedora.redhat.com/viewcvs/status-report-scripts/getReviewByFlags?root=fedora&rev=1.1&view=auto
http://cvs.fedora.redhat.com/viewcvs/status-report-scripts/pyGetReviewByFlags?root=fedora&rev=1.1&view=auto

Setting a flag can apparently be done thusly (not tested):
#!/usr/bin/perl -w

use XMLRPC::Lite;
use Data::Dumper;

my $bugid = shift;
my $username = shift;
my $password = shift;

my $data = {
	'devel_ack' => 'X',
	'pm_ack' => 'X',
	'qa_ack' => 'X',
};

my $rpc = new
XMLRPC::Lite(proxy=>'https://bugzilla.redhat.com/bugzilla/xmlrpc.cgi');

my $call = $rpc->call('bugzilla.updateFlags', $bugid, $data, $username,
$password);

my $result = "";
if ($call->faultstring) {
    print $call->faultstring . "\n";
    exit;
} else {
    $result = $call->result;
}

print Dumper($result);

HTH,
					C




More information about the Fedora-maintainers mailing list