> > How do I debug this further?  This is against bugzilla 2.20.

Dmitri, thanks SO MUCH for looking into this.

> I assume this is related to the subroutine
> bugzilla_2_20_fixed_AppendComment, specifically:
> 
>     $dbh->do(q{INSERT INTO longdescs
>                       (bug_id, who, bug_when, thetext, isprivate, work_time)
>                VALUES (?,?,?,?,?,?)}, undef,
>              ($bugid, $whoid, $timestamp, $comment, $privacyval, $work_time));
>     $dbh->do("UPDATE bugs SET delta_ts = ? WHERE bug_id = ?",
>              undef, ($timestamp, $bugid));
> 
> I've checked the database config, and it looks good.  I've also
> checked the table structures and they look ok.  What's the easiest way
> of getting some debug out of this?  Apart from writing some very basic
> cgi scripts many many years ago I have zero perl experience and don't
> know how to get the info I want out of this - surely there must be a
> way to provide more useful debug information.  Any tips?

Yeah, try adding the following code in various places in Daemon.pm (or
Bugzilla.pm, or Integration.pm):

open OUTFILE, ">> /tmp/debug.txt";
print OUTFILE "some debugging statement here";
# e.g.
print OUTFILE "userid is " . Dumper( $userid );
print OUTFILE "username is " . Dumper( $username );
close OUTFILE;


My guess is that Bugzilla.pm.in:integration_add_comment falls to the
case where ($userid <= 0):

        if ( $userid > 0 ) {
            bugzilla_2_20_fixed_AppendComment( $bugid, $userid, $comment );
            return 0;
        } else {
            # This should never happen. Each user should have a
            # corresponding userid in the database schema
            return 1;
        }

Somehow the userid supplied does not map to a userid in Bugzilla.

Please debug this for us!! It seems to be a real bug that we haven't
fixed yet.

_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to