# -------------------- # returns an array of the column names to be displayed. # The column names to use are those of the field names in the bug table. # In addition, you can use the following: # - "selection" for selection checkboxes. # - "edit" for icon to open the edit page. # - "custom_xxxx" were xxxx is the name of the custom field that is valid for the # current project. In case of "All Projects, the field will be empty where it is # not applicable. # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php function custom_function_override_get_columns_to_view( $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_columns = array(); if ( $p_columns_target == COLUMNS_TARGET_CSV_PAGE ) { $t_columns[] = 'id'; // localized: 'id', $t_columns[] = 'project_id'; // 'email_project' $t_columns[] = 'reporter_id'; // 'reporter' $t_columns[] = 'handler_id'; // 'assigned_to' $t_columns[] = 'priority'; // 'priority' $t_columns[] = 'severity'; // 'severity' $t_columns[] = 'reproducibility'; // 'reproducibility' $t_columns[] = 'version'; // 'version' $t_columns[] = 'projection'; // 'projection' $t_columns[] = 'category'; // 'category' $t_columns[] = 'date_submitted'; // 'date_submitted' $t_columns[] = 'eta'; // 'eta' $t_columns[] = 'os'; // 'os' $t_columns[] = 'os_build'; // 'os_version' $t_columns[] = 'platform'; // 'platform' $t_columns[] = 'view_state'; // 'view_status' $t_columns[] = 'last_updated'; // 'last_update' $t_columns[] = 'summary'; // 'summary' $t_columns[] = 'status'; // 'status' $t_columns[] = 'resolution'; // 'resolution' $t_columns[] = 'fixed_in_version'; // 'fixed_in_version'; if ( OFF == config_get( 'enable_relationship' ) ) { $t_columns[] = 'duplicate_id'; // 'duplicate_id' } } else { $t_columns[] = 'selection'; if ( $p_columns_target == COLUMNS_TARGET_VIEW_PAGE ) { $t_columns[] = 'edit'; } # $t_columns[] = 'priority'; $t_columns[] = 'id'; $t_columns[] = 'Risk #'; $t_columns[] = 'custom_Special Priority'; $t_columns[] = 'custom_Marketing #'; $t_enable_sponsorship = config_get( 'enable_sponsorship' ); if ( ON == $t_enable_sponsorship ) { $t_columns[] = 'sponsorship_total'; } $t_columns[] = 'bugnotes_count'; $t_show_attachments = config_get( 'show_attachment_indicator' ); if ( ON == $t_show_attachments ) { $t_columns[] = 'attachment'; } $t_columns[] = 'category'; # $t_columns[] = 'severity'; $t_columns[] = 'status'; $t_columns[] = 'last_updated'; $t_columns[] = 'summary'; } return $t_columns; } #modified print_view_bug_sort_link to fix the problem. function print_view_bug_sort_link( $p_string, $p_sort_field, $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { if ( $p_columns_target == COLUMNS_TARGET_PRINT_PAGE ) { if ( $p_sort_field == $p_sort ) { # We toggle between ASC and DESC if the user clicks the same sort order if ( 'ASC' == $p_dir ) { $p_dir = 'DESC'; } else { $p_dir = 'ASC'; } } else { # Otherwise always start with ASCending $t_dir = 'ASC'; } echo ''.$p_string.''; } else if ( $p_columns_target == COLUMNS_TARGET_VIEW_PAGE ) { if ( $p_sort_field == $p_sort ) { # we toggle between ASC and DESC if the user clicks the same sort order if ( 'ASC' == $p_dir ) { $p_dir = 'DESC'; } else { $p_dir = 'ASC'; } } else { # Otherwise always start with ASCending $t_dir = 'ASC'; } echo ''.$p_string.''; } else { echo $p_string; } }