$t_bug_data->profile_id = gpc_get_int('profile_id', 0); $t_bug_data->handler_id = gpc_get_int('handler_id', 0); $t_bug_data->view_state = gpc_get_int('view_state', config_get('default_bug_view_status')); $t_bug_data->category_id = gpc_get_int('category_id', 0); $t_bug_data->reproducibility = gpc_get_int('reproducibility', config_get('default_bug_reproducibility')); $t_bug_data->severity = gpc_get_int('severity', config_get('default_bug_severity')); $t_bug_data->priority = gpc_get_int('priority', config_get('default_bug_priority')); $t_bug_data->projection = gpc_get_int('projection', config_get('default_bug_projection')); $t_bug_data->eta = gpc_get_int('eta', config_get('default_bug_eta')); $t_bug_data->resolution = gpc_get_string('resolution', config_get('default_bug_resolution')); $t_bug_data->status = gpc_get_string('status', config_get('bug_submit_status')); $t_bug_data->summary = gpc_get_string('summary'); $t_bug_data->description = gpc_get_string('description'); $t_bug_data->steps_to_reproduce = gpc_get_string('steps_to_reproduce', config_get('default_bug_steps_to_reproduce')); $t_bug_data->additional_information = gpc_get_string('additional_info', config_get('default_bug_additional_info')); $t_bug_data->due_date = gpc_get_string('due_date', date_strtotime(config_get('due_date_default'))); if (is_blank($t_bug_data->due_date)) { $t_bug_data->due_date = date_get_null(); } $f_rel_type = gpc_get_int('rel_type', BUG_REL_NONE); $f_files = gpc_get_file('ufile', null); $f_report_stay = gpc_get_bool('report_stay', false); $f_copy_notes_from_parent = gpc_get_bool('copy_notes_from_parent', false); $f_copy_attachments_from_parent = gpc_get_bool('copy_attachments_from_parent', false); $f_tag_select = gpc_get_int('tag_select', 0); $f_tag_string = gpc_get_string('tag_string', ''); if (access_has_project_level(config_get('roadmap_update_threshold'), $t_bug_data->project_id)) { $t_bug_data->target_version = gpc_get_string('target_version', ''); } # Prevent unauthorized users setting handler when reporting issue if ($t_bug_data->handler_id > 0) {
if ($f_target_version === '' || version_get_id($f_target_version, $t_bug->project_id) !== false) { # @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); bug_set_field($t_bug_id, 'target_version', $f_target_version); email_bug_updated($t_bug_id); helper_call_custom_function('issue_update_notify', array($t_bug_id)); } else { $t_failed_ids[$t_bug_id] = lang_get('bug_actiongroup_version'); } } else { $t_failed_ids[$t_bug_id] = lang_get('bug_actiongroup_access'); } break; case 'UP_DUE_DATE': $t_due_date = gpc_get_string('due_date', null); if ($t_due_date !== null) { $t_due_date = date_strtotime($t_due_date); if (access_has_bug_level(config_get('due_date_update_threshold'), $t_bug_id)) { bug_set_field($t_bug_id, 'due_date', $t_due_date); } else { $t_failed_ids[$t_bug_id] = lang_get('bug_actiongroup_access'); } } break; case 'VIEW_STATUS': if (access_has_bug_level(config_get('change_view_status_threshold'), $t_bug_id)) { $f_view_status = gpc_get_int('view_status'); # @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); bug_set_field($t_bug_id, 'view_state', $f_view_status); email_bug_updated($t_bug_id); helper_call_custom_function('issue_update_notify', array($t_bug_id)); } else {