. /** * @package MantisBT * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net * @link http://www.mantisbt.org * * @uses core.php * @uses access_api.php * @uses authentication_api.php * @uses bug_api.php * @uses config_api.php * @uses constant_inc.php * @uses custom_field_api.php * @uses date_api.php * @uses event_api.php * @uses form_api.php * @uses gpc_api.php * @uses helper_api.php * @uses html_api.php * @uses lang_api.php * @uses print_api.php * @uses relationship_api.php * @uses sponsorship_api.php * @uses version_api.php */ /** * MantisBT Core API's */ require_once( 'core.php' ); require_api( 'access_api.php' ); require_api( 'authentication_api.php' ); require_api( 'bug_api.php' ); require_api( 'config_api.php' ); require_api( 'constant_inc.php' ); require_api( 'custom_field_api.php' ); require_api( 'date_api.php' ); require_api( 'event_api.php' ); require_api( 'form_api.php' ); require_api( 'gpc_api.php' ); require_api( 'helper_api.php' ); require_api( 'html_api.php' ); require_api( 'lang_api.php' ); require_api( 'print_api.php' ); require_api( 'relationship_api.php' ); require_api( 'sponsorship_api.php' ); require_api( 'version_api.php' ); $g_allow_browser_cache = 1; $f_bug_id = gpc_get_int( 'id' ); $t_bug = bug_get( $f_bug_id ); $tpl_file = __FILE__; $tpl_mantis_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR; $tpl_show_page_header = false; $tpl_force_readonly = true; $tpl_fields_config_option = 'bug_change_status_page_fields'; 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 ); $t_current_user_id = auth_get_current_user_id(); 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' ) == $t_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(); } $t_can_update_due_date = access_has_bug_level( config_get( 'due_date_update_threshold' ), $f_bug_id ); if ( $t_can_update_due_date ) { require_js( 'jscalendar/calendar.js' ); require_js( 'jscalendar/lang/calendar-en.js' ); require_js( 'jscalendar/calendar-setup.js' ); require_css( 'calendar-blue.css' ); } # 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 ( config_get( 'bug_assigned_status' ) == $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( " ", "_", MantisEnum::getLabel( config_get( 'status_enum_string' ), $f_new_status ) ); $t_resolved = config_get( 'bug_resolved_status_threshold' ); $t_closed = config_get( 'bug_closed_status_threshold' ); $t_bug = bug_get( $f_bug_id ); html_page_top( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ); print_recently_visited(); ?>
= $t_resolved ) { if ( relationship_can_resolve_bug( $f_bug_id ) == false ) { echo ""; } } ?> resolution; $t_bug_is_open = $t_current_resolution < $t_resolved; if ( ( $f_new_status >= $t_resolved ) && ( ( $f_new_status < $t_closed ) || ( $t_bug_is_open ) ) ) { ?> > = $t_resolved && $f_new_status < $t_closed && $t_resolution != config_get( 'bug_duplicate_resolution' ) ) { ?> > handler_id; if ( $t_suggested_handler_id == NO_USER && access_has_bug_level( config_get( 'handle_bug_threshold' ), $f_bug_id ) ) { $t_suggested_handler_id = $t_current_user_id; } ?> > due_date ) ) { $t_date_to_display = date( config_get( 'calendar_date_format' ), $t_bug->due_date ); } ?> > > > project_id ) ) > 0 ) ); if ( $t_show_product_version ) { ?> > > > >
" . lang_get( 'relationship_warning_blocking_bugs_not_resolved_2' ) . "
" ?>
*
/>