. #------------------------------ # $Revision: 2643 $ # $Author: al $ # $Date: 2009-06-18 19:06:27 -0400 (Thu, 18 Jun 2009) $ #------------------------------ require_once( 'core.php' ); $t_core_path = config_get( 'core_path' ); require_once( $t_core_path.'bug_api.php' ); require_once( $t_core_path.'custom_field_api.php' ); require_once( $t_core_path.'relationship_api.php' ); $f_bug_id = gpc_get_int( 'bug_id' ); $t_bug = bug_get( $f_bug_id ); if( $t_bug->project_id != helper_get_current_project() ) { # in case the current project is not the same project of the bug we are viewing... # ... override the current project. This to avoid problems with categories and handlers lists etc. $g_project_override = $t_bug->project_id; } $f_new_status = gpc_get_int( 'new_status' ); $f_reopen_flag = gpc_get_int( 'reopen_flag', OFF ); if ( ! ( ( access_has_bug_level( access_get_status_threshold( $f_new_status, bug_get_field( $f_bug_id, 'project_id' ) ), $f_bug_id ) ) || ( ( bug_get_field( $f_bug_id, 'reporter_id' ) == auth_get_current_user_id() ) && ( ( ON == config_get( 'allow_reporter_reopen' ) ) || ( ON == config_get( 'allow_reporter_close' ) ) ) ) || ( ( ON == $f_reopen_flag ) && ( access_has_bug_level( config_get( 'reopen_bug_threshold' ), $f_bug_id ) ) ) ) ) { access_denied(); } # get new issue handler if set, otherwise default to original handler $f_handler_id = gpc_get_int( 'handler_id', bug_get_field( $f_bug_id, 'handler_id' ) ); if ( ASSIGNED == $f_new_status ) { $t_bug_sponsored = sponsorship_get_amount( sponsorship_get_all_ids( $f_bug_id ) ) > 0; if ( $t_bug_sponsored ) { if ( !access_has_bug_level( config_get( 'assign_sponsored_bugs_threshold' ), $f_bug_id ) ) { trigger_error( ERROR_SPONSORSHIP_ASSIGNER_ACCESS_LEVEL_TOO_LOW, ERROR ); } } if ( $f_handler_id != NO_USER ) { if ( !access_has_bug_level( config_get( 'handle_bug_threshold' ), $f_bug_id, $f_handler_id ) ) { trigger_error( ERROR_HANDLER_ACCESS_TOO_LOW, ERROR ); } if ( $t_bug_sponsored ) { if ( !access_has_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $f_bug_id, $f_handler_id ) ) { trigger_error( ERROR_SPONSORSHIP_HANDLER_ACCESS_LEVEL_TOO_LOW, ERROR ); } } } } $t_status_label = str_replace( " ", "_", get_enum_to_string( config_get( 'status_enum_string' ), $f_new_status ) ); $t_resolved = config_get( 'bug_resolved_status_threshold' ); $t_bug = bug_get( $f_bug_id ); html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ); html_page_top2(); ?>
"; } } } ?> resolution; $t_bug_is_open = in_array( $t_current_resolution, array( OPEN, REOPENED ) ); if ( ( $t_resolved <= $f_new_status ) && ( ( CLOSED > $f_new_status ) || ( $t_bug_is_open ) ) ) { ?> > $f_new_status ) ) { ?> > $f_new_status ) && access_has_bug_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold')), $f_bug_id) ) { ?> > $f_new_status ) ) { $t_custom_status_label = "resolved"; } if ( CLOSED == $f_new_status ) { $t_custom_status_label = "closed"; } $t_related_custom_field_ids = custom_field_get_linked_ids( bug_get_field( $f_bug_id, 'project_id' ) ); foreach( $t_related_custom_field_ids as $t_id ) { $t_def = custom_field_get_definition( $t_id ); $t_display = $t_def['display_' . $t_custom_status_label]; $t_require = $t_def['require_' . $t_custom_status_label]; if ( ( "update" == $t_custom_status_label ) && ( ! $t_require ) ) { continue; } if ( in_array( $t_custom_status_label, array( "resolved", "closed" ) ) && ! ( $t_display || $t_require ) ) { continue; } if ( custom_field_has_write_access( $t_id, $f_bug_id ) ) { ?> > > = $t_resolved ) && access_has_bug_level( config_get( 'handle_bug_threshold' ), $f_bug_id ) ) { $t_show_version = ( ON == config_get( 'show_product_version' ) ) || ( ( AUTO == config_get( 'show_product_version' ) ) && ( count( version_get_all_rows( $t_bug->project_id ) ) > 0 ) ); if ( $t_show_version ) { ?> > = $t_resolved ) && ( CLOSED > $f_new_status ) ) { ?> > \n", config_get( 'bug_reopen_resolution' ) ); } ?> > > >
" . lang_get( 'relationship_warning_blocking_bugs_not_resolved_2' ) . "
*