From e0ca2425c20f3a573076324065d606ede638e0f4 Mon Sep 17 00:00:00 2001 From: David Hicks Date: Mon, 5 Oct 2009 19:02:15 +1100 Subject: [PATCH] Fix #10748: CSV export: add due date column The CSV export functionality needs to be able to export the due_date column. However, we don't export the overdue column (yet) because implementation of this column is a little bit more tricky with the current CSV API. --- core/csv_api.php | 13 +++++++++++++ core/helper_api.php | 1 + 2 files changed, 14 insertions(+) diff --git a/core/csv_api.php b/core/csv_api.php index 76885ed9a0..a829605102 100644 --- a/core/csv_api.php +++ b/core/csv_api.php @@ -384,3 +384,16 @@ function csv_format_duplicate_id( $p_duplicate_id ) { function csv_format_selection( $p_duplicate_id ) { return csv_escape_string( '' ); } + +/** + * return the due date column + * @param int $p_due_date + * @return string + * @access public + */ +function csv_format_due_date( $p_due_date ) { + static $s_date_format = null; + if ( $s_date_format === null ) + $s_date_format = config_get( 'short_date_format' ); + return csv_escape_string( date( $s_date_format, $p_due_date ) ); +} diff --git a/core/helper_api.php b/core/helper_api.php index 31ce3352c2..d46645c359 100644 --- a/core/helper_api.php +++ b/core/helper_api.php @@ -381,6 +381,7 @@ function helper_get_columns_to_view( $p_columns_target = COLUMNS_TARGET_VIEW_PAG $t_keys_to_remove[] = 'selection'; $t_keys_to_remove[] = 'edit'; $t_keys_to_remove[] = 'bugnotes_count'; + $t_keys_to_remove[] = 'overdue'; } $t_enable_sponsorship = config_get( 'enable_sponsorship' );