1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Adjustments for task impotrs

This commit is contained in:
David Bomba 2024-02-09 14:21:19 +11:00
parent f1b81e1587
commit 8486bc4ad4
2 changed files with 28 additions and 3 deletions

View File

@ -31,9 +31,9 @@ class TaskMap
12 => 'task.duration',
13 => 'task.status',
14 => 'task.custom_value1',
15 => 'task.custom_value1',
16 => 'task.custom_value1',
17 => 'task.custom_value1',
15 => 'task.custom_value2',
16 => 'task.custom_value3',
17 => 'task.custom_value4',
18 => 'task.notes',
];
}

View File

@ -115,11 +115,22 @@ class TaskTransformer extends BaseTransformer
$this->stubbed_timestamp = $stub_start_date->timestamp;
return $stub_start_date->timestamp;
} catch (\Exception $e) {
nlog("fall back failed too" . $e->getMessage());
// return $this->stubbed_timestamp;
}
try {
$stub_start_date = \Carbon\Carbon::createFromFormat($this->company->date_format(), $stub_start_date);
$this->stubbed_timestamp = $stub_start_date->timestamp;
} catch (\Exception $e) {
nlog($e->getMessage());
return $this->stubbed_timestamp;
}
}
private function resolveEndDate($item)
@ -142,9 +153,23 @@ class TaskTransformer extends BaseTransformer
} catch (\Exception $e) {
nlog($e->getMessage());
// return $this->stubbed_timestamp;
}
try {
$stub_end_date = \Carbon\Carbon::createFromFormat($this->company->date_format(), $stub_end_date);
$this->stubbed_timestamp = $stub_end_date->timestamp;
} catch (\Exception $e) {
nlog("fall back failed too" . $e->getMessage());
return $this->stubbed_timestamp;
}
}
private function getTaskStatusId($item): ?int