WWW-Bugzilla3

 view release on metacpan or  search on metacpan

lib/WWW/Bugzilla3.pm  view on Meta::CPAN

	component (string) Required - The name of a component in the product above. 
	summary (string) Required - A brief description of the bug being filed. 
	version (string) Required - A version of the product above; the version the bug was found in. 
	description (string) Defaulted - The initial description for this bug. Some Bugzilla installations require this to not be blank. 
	op_sys (string) Defaulted - The operating system the bug was discovered on. 
	platform (string) Defaulted - What type of hardware the bug was experienced on. 
	priority (string) Defaulted - What order the bug will be fixed in by the developer, compared to the developer's other bugs. 
	severity (string) Defaulted - How severe the bug is. 
	alias (string) - A brief alias for the bug that can be used instead of a bug number when accessing this bug. Must be unique in all of this Bugzilla. 
	assigned_to (username) - A user to assign this bug to, if you don't want it to be assigned to the component owner. 
	cc (array) - An array of usernames to CC on this bug. 
	qa_contact (username) - If this installation has QA Contacts enabled, you can set the QA Contact here if you don't want to use the component's default QA Contact. 
	status (string) - The status that this bug should start out as. Note that only certain statuses can be set on bug creation. 
	target_milestone (string) - A valid target milestone for this product.

In addition to the above parameters, if your installation has any custom fields, you can set them just by passing in the name of the field and its value as a string.
Returns one element, id. This is the id of the newly-filed bug.

=cut

sub create_bug($%) {
	my ($self, %p) = @_;
	my $rs = $self->{rpc}->simple_request('Bug.create', \%p)->{id};
}

=head2 named_search

	in: name
	out: ids

Execute saved search. Returns list of bugs.

=cut

sub named_search($$) {
	shift->search(cmdtype => 'runnamed', namedcmd => shift);
}

=head2 search

Execute search. Returns list of bugs.

=cut

sub search($%) {
	my ($self, %param) = @_;
	$param{ctype} = 'atom';
	my $r = $self->_post($self->{site} . 'buglist.cgi', join '&', 
		map { uri_escape($_) . "=" . uri_escape($param{$_}) } keys %param);
	return grep s/^.*<id>.*?\?id=(\d+)<\/id>.*$/$1/, split "\n", $r;
}

=head2 ua

	out: useragent

Returns LWP::UserAgent object user for communications with bugzilla.

=cut

sub ua($) {
	shift->{rpc}->useragent;
}

1;

=head1 AUTHOR

Alexey Alexandrov, C<< <swined at cpan.org> >>

=head1 BUGS

Please report any bugs or feature requests to
C<bug-www-bugzilla3 at rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Bugzilla3>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

	perldoc WWW::Bugzilla3

You can also look for information at:

=over 4

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/WWW-Bugzilla3>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/WWW-Bugzilla3>

=item * RT: CPAN's request tracker

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Bugzilla3>

=item * Search CPAN

L<http://search.cpan.org/dist/WWW-Bugzilla3>

=back

=head1 COPYRIGHT & LICENSE

Copyright 2007 Alexey Alexandrov, all rights reserved.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

=cut



( run in 2.145 seconds using v1.01-cache-2.11-cpan-524268b4103 )