Bugzilla::Bug->check in Bugzilla 3.4 first checks for access to the bug.
Therefore you need to have logged in before calling this method. I
noticed that this was a problem in the latest Scmbug. All you need to do
is move the check to after the user has logged in like so:
---
/home/ghendricks/src/SCMBUG_RELEASE_0-26-17/src/lib/product/Daemon/Bugzilla.pm
2010-05-20 14:07:53.000000000 -0600
+++ Daemon/Bugzilla.pm 2010-05-20 16:44:06.000000000 -0600
@@ -567,9 +567,9 @@
# Since Bugzilla 3.1.3 AppendComment has been replaced by
add_comment
my $userid = Bugzilla::User::login_to_id( $username );
if ( $userid > 0 ) {
- my $bug = Bugzilla::Bug->check($bugid);
my $user = new Bugzilla::User($userid);
Bugzilla->set_user($user);
+ my $bug = Bugzilla::Bug->check($bugid);
$bug->add_comment($comment, {isprivate => 0, work_time =>
0, type => Bugzilla::Constants->CMT_NORMAL, extra_data => ""} );
$bug->update();
return 0;
=========================
Cheers,
++Greg
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users