diff --git a/app/Export/CSV/BaseExport.php b/app/Export/CSV/BaseExport.php index 605abff1e2..a3bac0bb12 100644 --- a/app/Export/CSV/BaseExport.php +++ b/app/Export/CSV/BaseExport.php @@ -1258,7 +1258,7 @@ class BaseExport $date_range = $this->input['date_range']; - if (array_key_exists('date_key', $this->input) && strlen($this->input['date_key']) > 1 && ($table_name && $this->columnExists($table_name, $this->input['date_key']))) { + if (array_key_exists('date_key', $this->input) && strlen($this->input['date_key'] ?? '') > 1 && ($table_name && $this->columnExists($table_name, $this->input['date_key']))) { $this->date_key = $this->input['date_key']; } @@ -1270,6 +1270,9 @@ class BaseExport $custom_end_date = now(); } + nlog($custom_start_date->format('Y-m-d')); + nlog($custom_end_date->format('Y-m-d')); + switch ($date_range) { case 'all': $this->start_date = 'All available data'; diff --git a/app/Export/CSV/TaskExport.php b/app/Export/CSV/TaskExport.php index bc357d61a9..155d61a88f 100644 --- a/app/Export/CSV/TaskExport.php +++ b/app/Export/CSV/TaskExport.php @@ -29,7 +29,7 @@ class TaskExport extends BaseExport { private $entity_transformer; - public string $date_key = 'created_at'; + public string $date_key = 'calculated_start_date'; private string $date_format = 'Y-m-d';