Skip to content

Commit

Permalink
Fix #10748: CSV export: add due date column
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davidhicks committed Oct 5, 2009
1 parent b4b10a4 commit 6b3560d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/csv_api.php
Expand Up @@ -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 ) );
}
1 change: 1 addition & 0 deletions core/helper_api.php
Expand Up @@ -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' );
Expand Down

0 comments on commit 6b3560d

Please sign in to comment.