Re: setting a flag via bugzilla's xlmrpc interface?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Fedora-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers

--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux