Browse Source

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

master
Lio Novelli 1 week ago
parent
commit
05d3324f10
  1. 2
      app/src/Utils/CsvReport/ReportCsv.php
  2. 3
      app/src/Utils/TimeTrackingServices/YoutrackService.php

2
app/src/Utils/CsvReport/ReportCsv.php

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

3
app/src/Utils/TimeTrackingServices/YoutrackService.php

@ -115,7 +115,8 @@ class YoutrackService implements YoutrackInterface
if ($status == 409) {
sleep(3);
// @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) {

Loading…
Cancel
Save