From 7a889c455e37f17b463995b6e7b4ec5da65a520b Mon Sep 17 00:00:00 2001 From: Jeppe Krogh Date: Mon, 6 Jan 2025 15:14:27 +0100 Subject: [PATCH 1/3] Changes in namespacing --- Controllers/Import.php | 2 +- Controllers/ImportMapping.php | 2 +- Controllers/ImportValidation.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Controllers/Import.php b/Controllers/Import.php index 328274e..4871aeb 100644 --- a/Controllers/Import.php +++ b/Controllers/Import.php @@ -6,7 +6,7 @@ use Illuminate\Http\RedirectResponse; use Leantime\Core\Controller\Controller; use Symfony\Component\HttpFoundation\Response; -use Leantime\Core\Template; +use Leantime\Core\UI\Template; use Leantime\Plugins\EstimateImport\Services\ImportHelper as ImportHelper; /** diff --git a/Controllers/ImportMapping.php b/Controllers/ImportMapping.php index b05e346..b87e0ac 100644 --- a/Controllers/ImportMapping.php +++ b/Controllers/ImportMapping.php @@ -5,7 +5,7 @@ use Exception; use Illuminate\Http\RedirectResponse; use Leantime\Core\Controller\Controller; -use Leantime\Core\Template; +use Leantime\Core\UI\Template; use Symfony\Component\HttpFoundation\Response; use Leantime\Plugins\EstimateImport\Services\ImportHelper as ImportHelper; diff --git a/Controllers/ImportValidation.php b/Controllers/ImportValidation.php index c27e30a..9dbf90f 100644 --- a/Controllers/ImportValidation.php +++ b/Controllers/ImportValidation.php @@ -4,7 +4,7 @@ use Illuminate\Http\RedirectResponse; use Leantime\Core\Controller\Controller; -use Leantime\Core\Template; +use Leantime\Core\UI\Template; use Leantime\Core\Language; use Leantime\Domain\Projects\Services\Projects; use Leantime\Domain\Users\Services\Users; From 1a112c16b118a757058d18b917479f20ae74e9b0 Mon Sep 17 00:00:00 2001 From: Jeppe Krogh Date: Mon, 6 Jan 2025 15:14:40 +0100 Subject: [PATCH 2/3] Added additional emptycheck when validating data --- Services/ImportHelper.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Services/ImportHelper.php b/Services/ImportHelper.php index fadc213..482bc11 100644 --- a/Services/ImportHelper.php +++ b/Services/ImportHelper.php @@ -190,6 +190,9 @@ public function dataValidationCheck(string $tempFilePath, array $dataToValidate) // Loop data and match fields names foreach ($data as $data_key => &$datum) { + if (!isset($datum[$key])) { + continue; + } if (trim($mapping_datum) === '-1') { unset($datum[$key]); if (empty($datum)) { From 3d143b67cbec23dee2f499261246fcb045cb2fe5 Mon Sep 17 00:00:00 2001 From: Jeppe Krogh Date: Mon, 6 Jan 2025 15:30:05 +0100 Subject: [PATCH 3/3] Updated changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7a0dfc..92cef39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +* [PR-12](/~https://github.com/ITK-Leantime/leantime-estimateimport/pull/12) + * Added compatability for Leantime 3.3.x + ## [1.0.0] - 2024-09-18 * [PR-8](/~https://github.com/ITK-Leantime/leantime-estimateimport/pull/9)