--- bug_actiongroup.php_1.50 2007-05-22 22:19:25.000000000 +0900 +++ bug_actiongroup.php 2007-05-24 23:43:16.000000000 +0900 @@ -111,12 +111,16 @@ } else { $t_assign_status = $t_status; } + $t_bug_sponsored = sponsorship_get_amount( sponsorship_get_all_ids( $t_bug_id ) ) > 0; # check that new handler has rights to handle the issue, and # that current user has rights to assign the issue - $t_threshold = access_get_status_threshold( $t_assign_status, bug_get_field( $t_bug_id, 'project_id' ) ); - if ( access_has_bug_level( $t_threshold , $t_bug_id, $f_assign ) && - access_has_bug_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ), $t_bug_id ) && - bug_check_workflow($t_status, $t_assign_status ) ) { + if ( access_has_bug_level( config_get( 'handle_bug_threshold' ) , $t_bug_id, $f_assign ) && + access_has_bug_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ), $t_bug_id ) && + bug_check_workflow($t_status, $t_assign_status ) && + # @@@ Iwao AVE!: added validation for sponsored bug + ( !$t_bug_sponsored || ( + access_has_bug_level( config_get( 'assign_sponsored_bugs_threshold' ), $t_bug_id ) && + access_has_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $t_bug_id, $f_assign ) ) ) ) { # @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); bug_assign( $t_bug_id, $f_assign ); helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );