| [ Index ] |
|
Code source de Mantis 1.1.0rc3 |
1 <?php 2 # Mantis - a php based bugtracking system 3 4 # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 5 # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net 6 7 # Mantis is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # Mantis is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with Mantis. If not, see <http://www.gnu.org/licenses/>. 19 20 # -------------------------------------------------------- 21 # $Id: bug_update_advanced_page.php,v 1.103.2.1 2007-10-13 22:32:57 giallu Exp $ 22 # -------------------------------------------------------- 23 24 require_once ( 'core.php' ); 25 26 $t_core_path = config_get( 'core_path' ); 27 28 require_once( $t_core_path.'ajax_api.php' ); 29 require_once( $t_core_path.'bug_api.php' ); 30 require_once( $t_core_path.'custom_field_api.php' ); 31 require_once( $t_core_path.'date_api.php' ); 32 require_once( $t_core_path.'last_visited_api.php' ); 33 require_once( $t_core_path.'projax_api.php' ); 34 ?> 35 <?php 36 $f_bug_id = gpc_get_int( 'bug_id' ); 37 38 $t_bug = bug_prepare_edit( bug_get( $f_bug_id, true ) ); 39 40 if( $t_bug->project_id != helper_get_current_project() ) { 41 # in case the current project is not the same project of the bug we are viewing... 42 # ... override the current project. This to avoid problems with categories and handlers lists etc. 43 $g_project_override = $t_bug->project_id; 44 $t_changed_project = true; 45 } else { 46 $t_changed_project = false; 47 } 48 49 if ( SIMPLE_ONLY == config_get( 'show_update' ) ) { 50 print_header_redirect ( 'bug_update_page.php?bug_id=' . $f_bug_id ); 51 } 52 53 if ( bug_is_readonly( $f_bug_id ) ) { 54 error_parameters( $f_bug_id ); 55 trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR ); 56 } 57 58 access_ensure_bug_level( config_get( 'update_bug_threshold' ), $f_bug_id ); 59 60 html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ); 61 html_page_top2(); 62 63 print_recently_visited(); 64 ?> 65 66 <br /> 67 <form method="post" action="bug_update.php"> 68 <table class="width100" cellspacing="1"> 69 <tr> 70 <td class="form-title" colspan="3"> 71 <input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" /> 72 <input type="hidden" name="update_mode" value="1" /> 73 <?php echo lang_get( 'updating_bug_advanced_title' ) ?> 74 </td> 75 <td class="right" colspan="3"> 76 <?php 77 print_bracket_link( string_get_bug_view_url( $f_bug_id ), lang_get( 'back_to_bug_link' ) ); 78 79 if ( BOTH == config_get( 'show_update' ) ) { 80 print_bracket_link( 'bug_update_page.php?bug_id=' . $f_bug_id, lang_get( 'update_simple_link' ) ); 81 } 82 ?> 83 </td> 84 </tr> 85 86 87 <tr class="row-category"> 88 <td width="15%"> 89 <?php echo lang_get( 'id' ) ?> 90 </td> 91 <td width="20%"> 92 <?php echo lang_get( 'category' ) ?> 93 </td> 94 <td width="15%"> 95 <?php echo lang_get( 'severity' ) ?> 96 </td> 97 <td width="20%"> 98 <?php echo lang_get( 'reproducibility' ) ?> 99 </td> 100 <td width="15%"> 101 <?php echo lang_get( 'date_submitted' ) ?> 102 </td> 103 <td width="15%"> 104 <?php echo lang_get( 'last_update' ) ?> 105 </td> 106 </tr> 107 108 109 <tr <?php echo helper_alternate_class() ?>> 110 111 <!-- Bug ID --> 112 <td> 113 <?php echo bug_format_id( $f_bug_id ) ?> 114 </td> 115 116 <!-- Category --> 117 <td> 118 <?php if ( $t_changed_project ) { 119 echo "[" . project_get_field( $t_bug->project_id, 'name' ) . "] "; 120 } ?> 121 <select <?php echo helper_get_tab_index() ?> name="category"> 122 <?php print_category_option_list( $t_bug->category, $t_bug->project_id ) ?> 123 </select> 124 </td> 125 126 <!-- Severity --> 127 <td> 128 <select <?php echo helper_get_tab_index() ?> name="severity"> 129 <?php print_enum_string_option_list( 'severity', $t_bug->severity ) ?> 130 </select> 131 </td> 132 133 <!-- Reproducibility --> 134 <td> 135 <select <?php echo helper_get_tab_index() ?> name="reproducibility"> 136 <?php print_enum_string_option_list( 'reproducibility', $t_bug->reproducibility ) ?> 137 </select> 138 </td> 139 140 <!-- Date Submitted --> 141 <td> 142 <?php print_date( config_get( 'normal_date_format' ), $t_bug->date_submitted ) ?> 143 </td> 144 145 <!-- Date Updated --> 146 <td> 147 <?php print_date( config_get( 'normal_date_format' ), $t_bug->last_updated ) ?> 148 </td> 149 150 </tr> 151 152 153 <!-- spacer --> 154 <tr class="spacer"> 155 <td colspan="6"></td> 156 </tr> 157 158 159 160 <tr <?php echo helper_alternate_class() ?>> 161 162 <!-- Reporter --> 163 <td class="category"> 164 <?php echo lang_get( 'reporter' ) ?> 165 </td> 166 <td> 167 <?php 168 if ( ON == config_get( 'use_javascript' ) ) { 169 $t_username = prepare_user_name( $t_bug->reporter_id ); 170 echo ajax_click_to_edit( $t_username, 'reporter_id', 'entrypoint=issue_reporter_combobox&issue_id=' . $f_bug_id ); 171 } else { 172 echo '<select <?php echo helper_get_tab_index() ?> name="reporter_id">'; 173 print_reporter_option_list( $t_bug->reporter_id, $t_bug->project_id ); 174 echo '</select>'; 175 } 176 ?> 177 </td> 178 179 <!-- View Status --> 180 <td class="category"> 181 <?php echo lang_get( 'view_status' ) ?> 182 </td> 183 <td> 184 <?php 185 if ( access_has_project_level( config_get( 'change_view_status_threshold' ) ) ) { ?> 186 <select <?php echo helper_get_tab_index() ?> name="view_state"> 187 <?php print_enum_string_option_list( 'view_state', $t_bug->view_state) ?> 188 </select> 189 <?php 190 } else { 191 echo get_enum_element( 'view_state', $t_bug->view_state ); 192 } 193 ?> 194 </td> 195 196 <!-- spacer --> 197 <td colspan="2"> </td> 198 </tr> 199 200 201 <tr <?php echo helper_alternate_class() ?>> 202 203 <!-- Assigned To --> 204 <td class="category"> 205 <?php echo lang_get( 'assigned_to' ) ?> 206 </td> 207 <td colspan="5"> 208 <?php if ( access_has_project_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ) ) ) { 209 ?> 210 <select <?php echo helper_get_tab_index() ?> name="handler_id"> 211 <option value="0"></option> 212 <?php print_assign_to_option_list( $t_bug->handler_id, $t_bug->project_id ) ?> 213 </select> 214 <?php 215 } else { 216 echo user_get_name( $t_bug->handler_id ); 217 } 218 ?> 219 </td> 220 221 </tr> 222 223 224 <tr <?php echo helper_alternate_class() ?>> 225 226 <!-- Priority --> 227 <td class="category"> 228 <?php echo lang_get( 'priority' ) ?> 229 </td> 230 <td align="left"> 231 <select <?php echo helper_get_tab_index() ?> name="priority"> 232 <?php print_enum_string_option_list( 'priority', $t_bug->priority ) ?> 233 </select> 234 </td> 235 236 <!-- Resolution --> 237 <td class="category"> 238 <?php echo lang_get( 'resolution' ) ?> 239 </td> 240 <td> 241 <select <?php echo helper_get_tab_index() ?> name="resolution"> 242 <?php print_enum_string_option_list( "resolution", $t_bug->resolution ) ?> 243 </select> 244 </td> 245 246 <!-- Platform --> 247 <td class="category"> 248 <?php echo lang_get( 'platform' ) ?> 249 </td> 250 <td> 251 <?php 252 if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) { 253 ?> 254 <select name="platform"> 255 <option value=""></option> 256 <?php 257 print_platform_option_list( $t_bug->platform ); 258 ?> 259 </select> 260 <?php 261 } else { 262 projax_autocomplete( 'platform_get_with_prefix', 'platform', array( 'value' => $t_bug->platform, 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) ); 263 } 264 ?> 265 </td> 266 267 </tr> 268 269 270 <tr <?php echo helper_alternate_class() ?>> 271 272 <!-- Status --> 273 <td class="category"> 274 <?php echo lang_get( 'status' ) ?> 275 </td> 276 <td bgcolor="<?php echo get_status_color( $t_bug->status ) ?>"> 277 <?php print_status_option_list( 'status', $t_bug->status, 278 ( $t_bug->reporter_id == auth_get_current_user_id() && 279 ( ON == config_get( 'allow_reporter_close' ) ) ), $t_bug->project_id ) ?> 280 </td> 281 282 <?php 283 # Duplicate Id 284 285 # MASC RELATIONSHIP 286 if ( OFF == config_get( 'enable_relationship' ) ) { 287 # Duplicate ID 288 echo '<td class="category">', lang_get( 'duplicate_id' ), ' </td>'; 289 echo '<td>'; 290 echo '<input ', helper_get_tab_index(), ' type="text" name="duplicate_id" value="', $t_bug->duplicate_id, '" maxlength="7" /> '; 291 echo '</td>'; 292 } else { 293 # spacer 294 echo '<td colspan="2"> </td>'; 295 } 296 ?> 297 298 <!-- Operating System --> 299 <td class="category"> 300 <?php echo lang_get( 'os' ) ?> 301 </td> 302 <td> 303 <?php 304 if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) { 305 ?> 306 <select name="os"> 307 <option value=""></option> 308 <?php 309 print_os_option_list( $t_bug->os ); 310 ?> 311 </select> 312 <?php 313 } else { 314 projax_autocomplete( 'os_get_with_prefix', 'os', array( 'value' => $t_bug->os, 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) ); 315 } 316 ?> 317 </td> 318 319 </tr> 320 321 322 <tr <?php echo helper_alternate_class() ?>> 323 324 <!-- Projection --> 325 <td class="category"> 326 <?php echo lang_get( 'projection' ) ?> 327 </td> 328 <td> 329 <select name="projection"> 330 <?php print_enum_string_option_list( 'projection', $t_bug->projection ) ?> 331 </select> 332 </td> 333 334 <!-- spacer --> 335 <td colspan="2"> </td> 336 337 <!-- OS Version --> 338 <td class="category"> 339 <?php echo lang_get( 'os_version' ) ?> 340 </td> 341 <td> 342 <?php 343 if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) { 344 ?> 345 <select name="os_build"> 346 <option value=""></option> 347 <?php 348 print_os_build_option_list( $t_bug->os_build ); 349 ?> 350 </select> 351 <?php 352 } else { 353 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() ) ); 354 } 355 ?> 356 </td> 357 358 </tr> 359 360 361 <tr <?php echo helper_alternate_class() ?>> 362 363 <!-- ETA --> 364 <td class="category"> 365 <!-- Fixed in Version --> 366 <?php echo lang_get( 'eta' ) ?> 367 </td> 368 <td> 369 <select <?php echo helper_get_tab_index() ?> name="eta"> 370 <?php print_enum_string_option_list( 'eta', $t_bug->eta ) ?> 371 </select> 372 </td> 373 374 <td class="category"> 375 <?php 376 $t_show_version = ( ON == config_get( 'show_product_version' ) ) 377 || ( ( AUTO == config_get( 'show_product_version' ) ) 378 && ( count( version_get_all_rows( $t_bug->project_id ) ) > 0 ) ); 379 if ( $t_show_version ) { 380 echo lang_get( 'fixed_in_version' ); 381 } 382 ?> 383 </td> 384 <td> 385 <?php 386 if ( $t_show_version ) { 387 ?> 388 <select <?php echo helper_get_tab_index() ?> name="fixed_in_version"> 389 <?php print_version_option_list( $t_bug->fixed_in_version, $t_bug->project_id, VERSION_ALL ) ?> 390 </select> 391 <?php 392 } 393 ?> 394 </td> 395 396 <!-- Product Version or Product Build, if version is suppressed --> 397 <td class="category"> 398 <?php 399 if ( $t_show_version ) { 400 echo lang_get( 'product_version' ); 401 } else { 402 echo lang_get( 'build' ); 403 } 404 ?> 405 </td> 406 <td> 407 <?php 408 if ( $t_show_version ) { 409 ?> 410 <select <?php echo helper_get_tab_index() ?> name="version"> 411 <?php print_version_option_list( $t_bug->version, $t_bug->project_id, VERSION_RELEASED ) ?> 412 </select> 413 <?php 414 } else { 415 ?> 416 <input type="text" name="build" size="16" maxlength="32" value="<?php echo $t_bug->build ?>" /> 417 <?php 418 } 419 ?> 420 421 </td> 422 423 </tr> 424 425 <?php 426 if ( $t_show_version ) { 427 ?> 428 429 <tr <?php echo helper_alternate_class() ?>> 430 431 <?php 432 if ( access_has_bug_level( config_get( 'roadmap_update_threshold' ), $f_bug_id ) ) { 433 ?> 434 <!-- spacer --> 435 <td colspan="2"> </td> 436 437 <td class="category"> 438 <?php 439 echo lang_get( 'target_version' ); 440 ?> 441 </td> 442 <td> 443 <select <?php echo helper_get_tab_index() ?> name="target_version"> 444 <?php print_version_option_list( $t_bug->target_version, $t_bug->project_id, VERSION_ALL ) ?> 445 </select> 446 </td> 447 <?php 448 } else { 449 ?> 450 <!-- spacer --> 451 <td colspan="4"> </td> 452 <?php 453 } 454 ?> 455 <!-- Build --> 456 <td class="category"> 457 <?php echo lang_get( 'build' ) ?> 458 </td> 459 <td> 460 <input <?php echo helper_get_tab_index() ?> type="text" name="build" size="16" maxlength="32" value="<?php echo $t_bug->build ?>" /> 461 </td> 462 463 </tr> 464 <?php 465 } 466 ?> 467 468 469 <!-- spacer --> 470 <tr class="spacer"> 471 <td colspan="6"></td> 472 </tr> 473 474 475 <!-- Summary --> 476 <tr <?php echo helper_alternate_class() ?>> 477 <td class="category"> 478 <?php echo lang_get( 'summary' ) ?> 479 </td> 480 <td colspan="5"> 481 <input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo $t_bug->summary ?>" /> 482 </td> 483 </tr> 484 485 486 <!-- Description --> 487 <tr <?php echo helper_alternate_class() ?>> 488 <td class="category"> 489 <?php echo lang_get( 'description' ) ?> 490 </td> 491 <td colspan="5"> 492 <textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="description"><?php echo $t_bug->description ?></textarea> 493 </td> 494 </tr> 495 496 497 <!-- Steps to Reproduce --> 498 <tr <?php echo helper_alternate_class() ?>> 499 <td class="category"> 500 <?php echo lang_get( 'steps_to_reproduce' ) ?> 501 </td> 502 <td colspan="5"> 503 <textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="steps_to_reproduce"><?php echo $t_bug->steps_to_reproduce ?></textarea> 504 </td> 505 </tr> 506 507 508 <!-- Additional Information --> 509 <tr <?php echo helper_alternate_class() ?>> 510 <td class="category"> 511 <?php echo lang_get( 'additional_information' ) ?> 512 </td> 513 <td colspan="5"> 514 <textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="additional_information"><?php echo $t_bug->additional_information ?></textarea> 515 </td> 516 </tr> 517 518 519 <tr class="spacer"> 520 <td colspan="6"></td> 521 </tr> 522 523 524 <!-- Custom Fields --> 525 <?php 526 $t_custom_fields_found = false; 527 $t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id ); 528 foreach( $t_related_custom_field_ids as $t_id ) { 529 $t_def = custom_field_get_definition( $t_id ); 530 if( ( $t_def['display_update'] || $t_def['require_update']) && custom_field_has_write_access( $t_id, $f_bug_id ) ) { 531 $t_custom_fields_found = true; 532 ?> 533 <tr <?php echo helper_alternate_class() ?>> 534 <td class="category"> 535 <?php if($t_def['require_update']) {?><span class="required">*</span><?php } ?><?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?> 536 </td> 537 <td colspan="5"> 538 <?php 539 print_custom_field_input( $t_def, $f_bug_id ); 540 ?> 541 </td> 542 </tr> 543 <?php 544 } 545 } # foreach( $t_related_custom_field_ids as $t_id ) 546 ?> 547 548 549 <?php if ( $t_custom_fields_found ) { ?> 550 <!-- spacer --> 551 <tr class="spacer"> 552 <td colspan="6"></td> 553 </tr> 554 <?php } # custom fields found ?> 555 556 557 <!-- Bugnote Text Box --> 558 <tr <?php echo helper_alternate_class() ?>> 559 <td class="category"> 560 <?php echo lang_get( 'add_bugnote_title' ) ?> 561 </td> 562 <td colspan="5"> 563 <textarea <?php echo helper_get_tab_index() ?> name="bugnote_text" cols="80" rows="10"></textarea> 564 </td> 565 </tr> 566 567 568 <!-- Bugnote Private Checkbox (if permitted) --> 569 <?php if ( access_has_bug_level( config_get( 'private_bugnote_threshold' ), $f_bug_id ) ) { ?> 570 <tr <?php echo helper_alternate_class() ?>> 571 <td class="category"> 572 <?php echo lang_get( 'private' ) ?> 573 </td> 574 <td colspan="5"> 575 <?php 576 $t_default_bugnote_view_status = config_get( 'default_bugnote_view_status' ); 577 if ( access_has_bug_level( config_get( 'set_view_status_threshold' ), $f_bug_id ) ) { 578 ?> 579 <input <?php echo helper_get_tab_index() ?> type="checkbox" name="private" <?php check_checked( config_get( 'default_bugnote_view_status' ), VS_PRIVATE ); ?> /> 580 <?php 581 echo lang_get( 'private' ); 582 } else { 583 echo get_enum_element( 'view_state', $t_default_bugnote_view_status ); 584 } 585 ?> 586 </td> 587 </tr> 588 <?php } ?> 589 590 <!-- Time Tracking (if permitted) --> 591 <?php if ( config_get('time_tracking_enabled') ) { ?> 592 <?php if ( access_has_bug_level( config_get( 'time_tracking_edit_threshold' ), $f_bug_id ) ) { ?> 593 <tr <?php echo helper_alternate_class() ?>> 594 <td class="category"> 595 <?php echo lang_get( 'time_tracking' ) ?> 596 </td> 597 <td colspan="5"> 598 <input type="text" name="time_tracking" size="5" value="0:00" /> 599 </td> 600 </tr> 601 <?php } ?> 602 <?php } ?> 603 604 <!-- Submit Button --> 605 <tr> 606 <td class="center" colspan="6"> 607 <input <?php echo helper_get_tab_index() ?> type="submit" class="button" value="<?php echo lang_get( 'update_information_button' ) ?>" /> 608 </td> 609 </tr> 610 611 612 </table> 613 </form> 614 615 <?php 616 include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'bugnote_view_inc.php' ); 617 html_page_bottom1( __FILE__ ); 618 619 last_visited_issue( $f_bug_id ); 620 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
|