On Tue, 2007-10-02 at 22:42 +0200, Andrew Sykes wrote:
> Kristis,
> 
> I'm afraid there's no change...
> 
> ** Scmbug error 7: Resolving bug '166' from state 'assigned' to state  
> 'resolved' would violate the workflow of the bug-tracker. Instead,  
> the resolution state could be changed to 'feedback' or 'resolved' or  
> 'closed' states.

I had another look at the source.
Bugtracker.pm.in:resolution_change_check seems to be returning 1. This
means the proposed new status was found to be invalid. This shouldn't be
happening. Someone needs to go in and debug that function.

Can you add something like the following:

sub resolution_change_check {
    my $self = shift;
    my ( $current_bug_status, $proposed_status, $proposed_resolution,
$bug_status_map ) = ( @_ );
    my $status_change_is_valid = 0;
    my $resolution_change_is_valid = 0;
    my $retval = 0;

        ## Add this 
        open OUTFILE, ">>/tmp/debug";
        print OUTFILE "===============================\n";
        print OUTFILE "current: $current_bug_status . "\n";
        print OUTFILE "proposed: $proposed_status . "\n";
        print OUTFILE "proposed_res: $proposed_resolution . "\n";
        print OUTFILE Dumper( $bug_status_map );
        close OUTFILE;


And then look in /tmp/debug to see what happens.

I have this suspicion that $proposed_status came in as input incorrect. 

My gut feeling is that
Mantis.pm.in:integration_bug_resolution_change_is_valid is calling
resolution_change_check incorrectly.



Perhaps it should be modified as follows:

diff -u -r1.41 Mantis.pm.in
--- src/lib/product/Daemon/Mantis.pm.in 17 Sep 2007 04:16:09 -0000
1.41
+++ src/lib/product/Daemon/Mantis.pm.in 2 Oct 2007 22:16:57 -0000
@@ -531,7 +531,7 @@

     my $bug_status = $self->integration_get_bug_status( $bugid );

-    return ( $self->resolution_change_check( $bug_status,
$self->mantis_bug_status_tokey( $proposed_status ),
$proposed_resolution, $mantis_bug_status_map ),
$self->mantis_bug_status_tostring( $bug_status ) );
+    return
( $self->resolution_change_check( $self->mantis_bug_status_tokey( $bug_status 
), $proposed_status , $proposed_resolution, $mantis_bug_status_map ), 
$self->mantis_bug_status_tostring( $bug_status ) );
 }


Yes, actually try this fix first before you add those debugging
statements.

Attachment: 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

Reply via email to