Hi Mark, please send all communication to the mailing list. I have not personally tested that change or read the Send() function documentation.
On Tue, 2008-12-30 at 11:32 -0500, Schibilla, Mark (Mark) wrote:
> Greetings,
>
> In reference to bug #832, I'm wondering if anyone has successfully
> used the workaround reported by Roudy Veve on Bugzilla 3.0.2? I am
> running this version with Scmbug 0-26-9. I've included the entire
> function from Bugzilla.pm. I added the line indicated by the comment
> #added 12_29_08 mschibilla.
>
> Thanks for your help!
>
>
> # Enters an SCM check-in comment, originating from the bug-tracking
> # username of the SCM user, against a bug
> #
> # PARAMETERS:
> # $1 - Bug id
> # $2 - Bug-tracker username of SCM user that will enter a comment
> # $3 - Comment to be entered
> #
> # RETURNS:
> # - 0 on success
> # - 1,<a string describing the error> on failure
> sub integration_add_comment {
> my $self = shift;
> my ( $bugid, $username, $comment ) = ( @_ );
>
> if ( $self->is_version_up_to_2_20() ) {
> # Bugzilla 2.20 does not have AppendComment in globals.pl It
> # was moved to Bugzilla::Bug. The original AppendComment takes
> # the user ID instead of the user name, so we need to convert
> # it here
> my $userid = Bugzilla::User::login_to_id( $username );
>
> 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, "Login '$username' could not be converted to an
> id in Bugzilla. Is username mapping setup correctly in
> daemon.conf ?\n" ;
> }
> } elsif ( $self->is_version_up_to_2_22() ||
> $self->is_version_latest() ) {
> # AppendComment was fixed in Bugzilla 2.22. Should use the
> # native version
> my $userid = Bugzilla::User::login_to_id( $username );
>
> if ( $userid > 0 ) {
> Bugzilla::Bug::AppendComment( $bugid, $userid, $comment );
> >> Bugzilla::BugMail::Send($bugid, {'changer' => $userid });
> #added 12_29_08 mschibilla
> return 0;
> } else {
> # This should never happen. Each user should have a
> # corresponding userid in the database schema
> return 1, "Login '$username' could not be converted to an
> id in Bugzilla. Is username mapping setup correctly in
> daemon.conf ?\n" ;
> }
> } else {
> AppendComment( $bugid, $username, $comment );
> return 0;
> }
> }
>
>
> Mark Schibilla
> LSI Corporation
> Rochester, MN
> 507-328-9006
>
>
>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ scmbug-users mailing list [email protected] http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
