Minor fixes: circumvent error in report download and uique projects in table.

master
Lio Novelli 2022-06-20 11:33:04 +02:00
parent 2e3f6b4bd8
commit 05d3324f10
2 changed files with 3 additions and 2 deletions

View File

@ -199,7 +199,7 @@ class ReportCsv implements ReportCsvInterface
$table[] = ReportCsvInterface::SEPARATOR_MEDIUM; $table[] = ReportCsvInterface::SEPARATOR_MEDIUM;
$table[] = [null, $project, null, $project_time / 60]; $table[] = [null, $project, null, $project_time / 60];
$time_sum += (float) $project_time; $time_sum += (float) $project_time;
$all_projects[] = $project; // $all_projects[] = $project;
// Add a sum of time for whole day. // Add a sum of time for whole day.
$table[] = ReportCsvInterface::SEPARATOR_MEDIUM; $table[] = ReportCsvInterface::SEPARATOR_MEDIUM;
$table[] = [null, implode(', ', $all_projects), null, $time_sum/60]; $table[] = [null, implode(', ', $all_projects), null, $time_sum/60];

View File

@ -115,7 +115,8 @@ class YoutrackService implements YoutrackInterface
if ($status == 409) { if ($status == 409) {
sleep(3); sleep(3);
// @TODO Find a way to break of of loop if necessary! // @TODO Find a way to break of of loop if necessary!
$this->downloadReport($report_id); var_dump("409 response status during download of report {$report_id}. Sleep 3 and try again.");
return $this->downloadReport($report_id);
} }
} }
catch (\Throwable $t) { catch (\Throwable $t) {