Blame Identity/Models/Html/Mantis/1.1.2-1.fc9/bug_update_advanced_page.php

4c79b5
4c79b5
# Mantis - a php based bugtracking system
4c79b5
4c79b5
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
4c79b5
# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
4c79b5
4c79b5
# Mantis is free software: you can redistribute it and/or modify
4c79b5
# it under the terms of the GNU General Public License as published by
4c79b5
# the Free Software Foundation, either version 2 of the License, or
4c79b5
# (at your option) any later version.
4c79b5
#
4c79b5
# Mantis is distributed in the hope that it will be useful,
4c79b5
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4c79b5
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4c79b5
# GNU General Public License for more details.
4c79b5
#
4c79b5
# You should have received a copy of the GNU General Public License
4c79b5
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
4c79b5
4c79b5
	#------------------------------
4c79b5
	#   $Revision: 2643 $
4c79b5
	#     $Author: al $    
4c79b5
	#       $Date: 2009-06-18 19:06:27 -0400 (Thu, 18 Jun 2009) $  
4c79b5
	#------------------------------
4c79b5
4c79b5
	require_once( 'core.php' );
4c79b5
4c79b5
	$t_core_path = config_get( 'core_path' );
4c79b5
4c79b5
	require_once( $t_core_path.'ajax_api.php' );
4c79b5
	require_once( $t_core_path.'bug_api.php' );
4c79b5
	require_once( $t_core_path.'custom_field_api.php' );
4c79b5
	require_once( $t_core_path.'date_api.php' );
4c79b5
	require_once( $t_core_path.'last_visited_api.php' );
4c79b5
	require_once( $t_core_path.'projax_api.php' );
4c79b5
?>
4c79b5
4c79b5
	$f_bug_id = gpc_get_int( 'bug_id' );
4c79b5
4c79b5
	$t_bug = bug_prepare_edit( bug_get( $f_bug_id, true ) );
4c79b5
4c79b5
	if( $t_bug->project_id != helper_get_current_project() ) {
4c79b5
		# in case the current project is not the same project of the bug we are viewing...
4c79b5
		# ... override the current project. This to avoid problems with categories and handlers lists etc.
4c79b5
		$g_project_override = $t_bug->project_id;
4c79b5
		$t_changed_project = true;
4c79b5
	} else {
4c79b5
		$t_changed_project = false;
4c79b5
	}
4c79b5
4c79b5
	if ( SIMPLE_ONLY == config_get( 'show_update' ) ) {
4c79b5
		print_header_redirect ( 'bug_update_page.php?bug_id=' . $f_bug_id );
4c79b5
	}
4c79b5
4c79b5
	if ( bug_is_readonly( $f_bug_id ) ) {
4c79b5
		error_parameters( $f_bug_id );
4c79b5
		trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
4c79b5
	}
4c79b5
4c79b5
	access_ensure_bug_level( config_get( 'update_bug_threshold' ), $f_bug_id );
4c79b5
4c79b5
	html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) );
4c79b5
	html_page_top2();
4c79b5
4c79b5
?>
4c79b5
4c79b5

4c79b5
<form method="post" action="bug_update.php">
4c79b5
4c79b5
4c79b5
4c79b5
	
4c79b5
		<input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
4c79b5
		<input type="hidden" name="update_mode"			value="1" />
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
4c79b5
	print_bracket_link( string_get_bug_view_url( $f_bug_id ), lang_get( 'back_to_bug_link' ) );
4c79b5
4c79b5
	if ( BOTH == config_get( 'show_update' ) ) {
4c79b5
		print_bracket_link( 'bug_update_page.php?bug_id=' . $f_bug_id, lang_get( 'update_simple_link' ) );
4c79b5
	}
4c79b5
?>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			echo "[" . project_get_field( $t_bug->project_id, 'name' ) . "] ";
4c79b5
		} ?>
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="category">
4c79b5
		category, $t_bug->project_id ) ?>
4c79b5
		</select>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="severity">
4c79b5
			severity ) ?>
4c79b5
		</select>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="reproducibility">
4c79b5
			reproducibility ) ?>
4c79b5
		</select>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		date_submitted ) ?>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		last_updated ) ?>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			if ( ON == config_get( 'use_javascript' ) ) {
4c79b5
				$t_username = prepare_user_name( $t_bug->reporter_id );
4c79b5
				echo ajax_click_to_edit( $t_username, 'reporter_id', 'entrypoint=issue_reporter_combobox&issue_id=' . $f_bug_id );
4c79b5
			} else {
4c79b5
				echo '<select <?php echo helper_get_tab_index() ?> name="reporter_id">';
4c79b5
				print_reporter_option_list( $t_bug->reporter_id, $t_bug->project_id );
4c79b5
				echo '</select>';
4c79b5
			}
4c79b5
		?>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
4c79b5
		if ( access_has_project_level( config_get( 'change_view_status_threshold' ) ) ) { ?>
4c79b5
			<select <?php echo helper_get_tab_index() ?> name="view_state">
4c79b5
				view_state) ?>
4c79b5
			</select>
4c79b5
4c79b5
		} else {
4c79b5
			echo get_enum_element( 'view_state', $t_bug->view_state );
4c79b5
		}
4c79b5
?>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	 
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
	
4c79b5
	?>
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="handler_id">
4c79b5
			<option value="0"></option>
4c79b5
			handler_id, $t_bug->project_id ) ?>
4c79b5
		</select>
4c79b5
	
4c79b5
		} else {
4c79b5
			echo user_get_name( $t_bug->handler_id );
4c79b5
		}
4c79b5
	?>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="priority">
4c79b5
			priority ) ?>
4c79b5
		</select>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="resolution">
4c79b5
			resolution ) ?>
4c79b5
		</select>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
4c79b5
		?>
4c79b5
				<select name="platform">
4c79b5
					<option value=""></option>
4c79b5
				
4c79b5
						print_platform_option_list( $t_bug->platform );
4c79b5
				?>
4c79b5
				</select>
4c79b5
		
4c79b5
			} else {
4c79b5
				projax_autocomplete( 'platform_get_with_prefix', 'platform', array( 'value' => $t_bug->platform, 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
4c79b5
			}
4c79b5
		?>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		status,
4c79b5
						( $t_bug->reporter_id == auth_get_current_user_id() &&
4c79b5
								( ON == config_get( 'allow_reporter_close' ) ) ), $t_bug->project_id ) ?>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
		# Duplicate Id
4c79b5
4c79b5
		# MASC RELATIONSHIP
4c79b5
		if ( OFF == config_get( 'enable_relationship' ) ) {
4c79b5
			# Duplicate ID
4c79b5
			echo '', lang_get( 'duplicate_id' ), ' ';
4c79b5
			echo '';
4c79b5
			echo '<input ', helper_get_tab_index(), ' type="text" name="duplicate_id" value="', $t_bug->duplicate_id, '" maxlength="7" /> ';
4c79b5
			echo '';
4c79b5
		} else {
4c79b5
			# spacer
4c79b5
			echo ' ';
4c79b5
		}
4c79b5
	?>
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
4c79b5
		?>
4c79b5
				<select name="os">
4c79b5
					<option value=""></option>
4c79b5
				
4c79b5
						print_os_option_list( $t_bug->os );
4c79b5
				?>
4c79b5
				</select>
4c79b5
		
4c79b5
			} else {
4c79b5
				projax_autocomplete( 'os_get_with_prefix', 'os', array( 'value' => $t_bug->os, 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
4c79b5
			}
4c79b5
		?>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<select name="projection">
4c79b5
			projection ) ?>
4c79b5
		</select>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	 
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
4c79b5
		?>
4c79b5
				<select name="os_build">
4c79b5
					<option value=""></option>
4c79b5
				
4c79b5
						print_os_build_option_list( $t_bug->os_build );
4c79b5
				?>
4c79b5
				</select>
4c79b5
		
4c79b5
			} else {
4c79b5
				projax_autocomplete( 'os_build_get_with_prefix', 'os_build', array( 'value' => $t_bug->os_build, 'size' => '16', 'maxlength' => '16', 'tabindex' => helper_get_tab_index_value() ) );
4c79b5
			}
4c79b5
		?>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
4c79b5
	
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="eta">
4c79b5
			eta ) ?>
4c79b5
		</select>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
		
4c79b5
			$t_show_version = ( ON == config_get( 'show_product_version' ) )
4c79b5
					|| ( ( AUTO == config_get( 'show_product_version' ) )
4c79b5
								&& ( count( version_get_all_rows( $t_bug->project_id ) ) > 0 ) );
4c79b5
			if ( $t_show_version ) {
4c79b5
				echo lang_get( 'fixed_in_version' );
4c79b5
			}
4c79b5
		?>
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			if ( $t_show_version ) {
4c79b5
		?>
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="fixed_in_version">
4c79b5
			fixed_in_version, $t_bug->project_id, VERSION_ALL ) ?>
4c79b5
		</select>
4c79b5
		
4c79b5
			}
4c79b5
		?>
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			if ( $t_show_version ) {
4c79b5
				echo lang_get( 'product_version' );
4c79b5
			} else {
4c79b5
				echo lang_get( 'build' );
4c79b5
			}
4c79b5
		?>
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			if ( $t_show_version ) {
4c79b5
		?>
4c79b5
		<select <?php echo helper_get_tab_index() ?> name="version">
4c79b5
			version, $t_bug->project_id, VERSION_RELEASED ) ?>
4c79b5
		</select>
4c79b5
		
4c79b5
			} else {
4c79b5
		?>
4c79b5
		<input type="text" name="build" size="16" maxlength="32" value="<?php echo $t_bug->build ?>" />
4c79b5
		
4c79b5
			}
4c79b5
		?>
4c79b5
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
	if ( $t_show_version ) {
4c79b5
?>
4c79b5
4c79b5
>
4c79b5
4c79b5
4c79b5
	if ( access_has_bug_level( config_get( 'roadmap_update_threshold' ), $f_bug_id ) ) {
4c79b5
?>
4c79b5
	
4c79b5
	 
4c79b5
4c79b5
	
4c79b5
		
4c79b5
			echo lang_get( 'target_version' );
4c79b5
		?>
4c79b5
	
4c79b5
	
4c79b5
	<select <?php echo helper_get_tab_index() ?> name="target_version">
4c79b5
		target_version, $t_bug->project_id, VERSION_ALL ) ?>
4c79b5
	</select>
4c79b5
	
4c79b5
4c79b5
	} else {
4c79b5
?>
4c79b5
	
4c79b5
	 
4c79b5
4c79b5
	}
4c79b5
?>
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<input <?php echo helper_get_tab_index() ?> type="text" name="build" size="16" maxlength="32" value="build ?>" />
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
	}
4c79b5
?>
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="80" maxlength="128" value="summary ?>" />
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="description">description ?></textarea>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="steps_to_reproduce">steps_to_reproduce ?></textarea>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="additional_information">additional_information ?></textarea>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
	$t_custom_fields_found = false;
4c79b5
	$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );
4c79b5
	foreach( $t_related_custom_field_ids as $t_id ) {
4c79b5
		$t_def = custom_field_get_definition( $t_id );
4c79b5
		if( ( $t_def['display_update'] || $t_def['require_update']) && custom_field_has_write_access( $t_id, $f_bug_id ) ) {
4c79b5
			$t_custom_fields_found = true;
4c79b5
?>
4c79b5
>
4c79b5
	
4c79b5
		*
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			print_custom_field_input( $t_def, $f_bug_id );
4c79b5
		?>
4c79b5
	
4c79b5
4c79b5
4c79b5
		}
4c79b5
	} # foreach( $t_related_custom_field_ids as $t_id )
4c79b5
?>
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<textarea <?php echo helper_get_tab_index() ?> name="bugnote_text" cols="80" rows="10"></textarea>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
4c79b5
		$t_default_bugnote_view_status = config_get( 'default_bugnote_view_status' );
4c79b5
		if ( access_has_bug_level( config_get( 'set_view_status_threshold' ), $f_bug_id ) ) {
4c79b5
?>
4c79b5
			<label title="<?php echo lang_get( 'private' ); ?>">
4c79b5
			<input <?php echo helper_get_tab_index() ?> type="checkbox" name="private"  />
4c79b5
4c79b5
			echo lang_get( 'private' );
4c79b5
			echo '</label>';
4c79b5
		} else {
4c79b5
			echo get_enum_element( 'view_state', $t_default_bugnote_view_status );
4c79b5
		}
4c79b5
?>
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
>
4c79b5
	
4c79b5
		
4c79b5
	
4c79b5
	
4c79b5
		<input type="text" name="time_tracking" size="5" value="0:00" />
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
	
4c79b5
		<input <?php echo helper_get_tab_index() ?> type="submit" class="button" value="" />
4c79b5
	
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
</form>
4c79b5
4c79b5
4c79b5
	include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'bugnote_view_inc.php' );
4c79b5
	html_page_bottom1( __FILE__ );
4c79b5
4c79b5
	last_visited_issue( $f_bug_id );
4c79b5
?>