This clarifies things for me too. Thanks a lot!

On Wed, 2007-10-17 at 00:18 +0200, Gonzalo Pérez Eguizabal wrote:
> > Why do I have this suspicion that your change in Bugtracker.pm might
> > have... broken automatic status resolution for everyone ? Including
> > Robert with TestDirector. I was pretty sure that the Mantis.pm.in file
> > was calling the Bugtracker.pm interface with the wrong parameters...
> I have only tested the change with Mantis. I will try to explain my 
> conclusions:
> 
> Mantis.pm.in:
>  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 ) );
> 
> param1 v. 1.44: $bug_status -> key (ie: 20)
> param1 v. 1.43: $self->mantis_bug_status_tostring( $bug_status ) ->
> name (ie: 'assigned')
> 
> param 2 v. 1.43: $proposed_status -> name (ie: 'resolved')
> param 2 v. 1.44: $self->mantis_bug_status_tokey( $proposed_status ) ->
> key (ie: 80)
> 
> 
> Bugtracker.pm.in
> version 1.27
> 
> # Verify the status change
>     foreach my $possible_resolution_state ( @{ $bug_status_map->{
> $current_bug_status }->{ possible_resolution_states } } ) {
>       if ( $possible_resolution_state eq $proposed_status ) {
>           # The status change is valid.
>           $status_change_is_valid = 1;
>       }
>     }
> 
>     # Verify the resolution
>     foreach my $possible_resolution ( @{ $bug_status_map->{
> $proposed_status }->{ possible_resolutions } } ) {
>       if ( $possible_resolution eq $proposed_resolution ) {
>           # The resolution change is valid.
>           $resolution_change_is_valid = 1;
>       }
>     }
> 
> $current_bug_status must be a key (ie: '20') to be able to access
> possible_resolution_states list in the first foreach.
> 
> $proposed_status must be a key (ie: '80') to be able to access
> possible_resolutions list in the second foreach.
> 
> This two premises bring us to version 1.44 of Mantis.pm.in.
> 
> But the problem now is in the condition inside the first loop.
> 
> if ( $possible_resolution_state eq $proposed_status ) {
> 
> $possible_resolution_state -> name (ie: resolved)
> $proposed_status -> KEY (ie: '80')
> 
> So, this variables will never be equals. And this is why y change the
> condition to:
>  if ( $possible_resolution_state eq $bug_status_map->{
> $proposed_status }->{ name } ) {
> Now, we compare name with name.
> 
> Thanks again,
> Gonzalo Pérez Eguizabal
> 
> P.D: I dont know if you understand my "english", if you dont
> understand something, tell me and i will try to explain with other
> words. :)

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