From 62827e6cf470449c117624058fb36ad94804bcc0 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 5 May 2020 14:25:42 +0200 Subject: Time tracking related plugins --- .../Console/SubtaskTimeTrackingExportCommand.php | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 plugins/Timetrackingeditor/Console/SubtaskTimeTrackingExportCommand.php (limited to 'plugins/Timetrackingeditor/Console/SubtaskTimeTrackingExportCommand.php') diff --git a/plugins/Timetrackingeditor/Console/SubtaskTimeTrackingExportCommand.php b/plugins/Timetrackingeditor/Console/SubtaskTimeTrackingExportCommand.php new file mode 100644 index 00000000..4f6e6384 --- /dev/null +++ b/plugins/Timetrackingeditor/Console/SubtaskTimeTrackingExportCommand.php @@ -0,0 +1,35 @@ +setName('export:subtaskstimetracking') + ->setDescription('Subtasks Time Tracking CSV export') + ->addArgument('project_id', InputArgument::REQUIRED, 'Project id') + ->addArgument('start_date', InputArgument::REQUIRED, 'Start date (YYYY-MM-DD)') + ->addArgument('end_date', InputArgument::REQUIRED, 'End date (YYYY-MM-DD)'); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $data = $this->subtaskTimeTrackingExport->export( + $input->getArgument('project_id'), + $input->getArgument('start_date'), + $input->getArgument('end_date') + ); + + if (is_array($data)) { + Html::output($data); + } + } +} -- cgit v1.2.3