From 0fa5db29fe3bf0c7dd19261a3d8624172d704bea Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:25:34 -0400 Subject: [PATCH 01/12] update confetti management --- app/Core/Template.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/Core/Template.php b/app/Core/Template.php index fe820aa5f..1d27105e0 100644 --- a/app/Core/Template.php +++ b/app/Core/Template.php @@ -681,9 +681,10 @@ public function displayNotification(): string if (session()->exists("confettiInYourFace") && session("confettiInYourFace") === true) { $notification .= app('blade.compiler')::render( '', [] ); @@ -759,9 +760,11 @@ public function displayInlineNotification(): string if (session()->exists("confettiInYourFace") && session("confettiInYourFace") === true) { $notification .= app('blade.compiler')::render( '', + spread: 70, + origin: { y: 1.2 }, + disableForReducedMotion: true + }); + ', [] ); From 6c2e9aa9b267e23c73277bf6b63bf1c26179517e Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:25:54 -0400 Subject: [PATCH 02/12] Ensure cache is set and used file for images --- app/Core/Fileupload.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/Core/Fileupload.php b/app/Core/Fileupload.php index 5bd418565..cecb47879 100644 --- a/app/Core/Fileupload.php +++ b/app/Core/Fileupload.php @@ -376,7 +376,10 @@ public function displayImageFile(string $imageName, string $fullPath = ''): Resp ); $responseFailure = new Response(file_get_contents(ROOT . '/dist/images/doc.png')); + $sLastModified = filemtime(ROOT . '/dist/images/doc.png'); $responseFailure->headers->set('Content-Type', 'image/png'); + $responseFailure->headers->set("Cache-Control", 'max-age=86400'); + $responseFailure->headers->set("Last-Modified", gmdate("D, d M Y H:i:s", $sLastModified) . " GMT"); if ($this->config->useS3 && $fullPath == '') { try { @@ -392,11 +395,11 @@ public function displayImageFile(string $imageName, string $fullPath = ''): Resp foreach ( [ - 'Content-Type' => $result['ContentType'], - 'Pragma' => 'public', - 'Cache-Control' => 'max-age=86400', - 'Expires' => gmdate('D, d M Y H:i:s \G\M\T', time() + 86400), - 'Content-disposition' => 'inline; filename="' . $imageName . '";', + 'Content-Type' => $result['ContentType'], + 'Pragma' => 'public', + 'Cache-Control' => 'max-age=86400', + 'Expires' => gmdate('D, d M Y H:i:s \G\M\T', time() + 86400), + 'Content-disposition' => 'inline; filename="' . $imageName . '";', ] as $header => $value ) { $response->headers->set($header, $value); From 0fff45e9aaeb6b3afde0125c2a28b795bf0d7ff3 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:26:07 -0400 Subject: [PATCH 03/12] ensure default value is used in theme settings --- app/Core/Theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Core/Theme.php b/app/Core/Theme.php index 754e2479d..9eeab5825 100644 --- a/app/Core/Theme.php +++ b/app/Core/Theme.php @@ -347,12 +347,12 @@ public function setActive(string $id): void { if ($id == '') { - $id = 'default'; + $id = static::DEFAULT; } //not a valid theme. Use default if (!is_dir(ROOT . '/theme/' . $id) || !file_exists(ROOT . '/theme/' . $id . '/' . static::DEFAULT_INI . '.ini')) { - $id = 'default'; + $id = static::DEFAULT; } //Only set if user is logged in From 85a96484e0017f24f9d82e79f59a29e4b00b9d36 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:26:23 -0400 Subject: [PATCH 04/12] Add modified fileds to db tables --- app/Core/AppSettings.php | 2 +- app/Domain/Install/Repositories/Install.php | 34 +++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/app/Core/AppSettings.php b/app/Core/AppSettings.php index 7c7f60bb2..5fab1e163 100644 --- a/app/Core/AppSettings.php +++ b/app/Core/AppSettings.php @@ -14,7 +14,7 @@ class AppSettings public string $appVersion = "3.2.0-beta-2"; - public string $dbVersion = "3.0.2"; + public string $dbVersion = "3.0.3"; /** * __construct diff --git a/app/Domain/Install/Repositories/Install.php b/app/Domain/Install/Repositories/Install.php index b31dfd6f7..c3cd1d333 100644 --- a/app/Domain/Install/Repositories/Install.php +++ b/app/Domain/Install/Repositories/Install.php @@ -100,6 +100,7 @@ class Install 20406, 20407, 30002, + 30003, ); /** @@ -386,6 +387,7 @@ private function sqlPrep(): string `projectId` INT NULL, `type` VARCHAR(45) NULL, `description` TEXT, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `ProjectIdType` (`projectId` ASC, `type` ASC) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -459,6 +461,7 @@ private function sqlPrep(): string `published` int(1) DEFAULT NULL, `age` int(3) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -525,6 +528,7 @@ private function sqlPrep(): string `avatar` MEDIUMTEXT NULL , `cover` MEDIUMTEXT NULL, `sortIndex` INT(11) NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -606,6 +610,7 @@ private function sqlPrep(): string `retrospectiveid` INT NULL, `ideaid` INT NULL, `zp_ticketscol` VARCHAR(45) NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `ProjectUserId` (`projectId`,`userId`), KEY `StatusSprint` (`status`,`sprint`), @@ -630,6 +635,7 @@ private function sqlPrep(): string `rate` varchar(255) DEFAULT NULL, `paid` int(2) DEFAULT NULL, `paidDate` datetime DEFAULT NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `Unique` (`userId`,`ticketId`,`workDate`,`kind`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -680,6 +686,7 @@ private function sqlPrep(): string `name` VARCHAR(45) NULL, `startDate` DATETIME NULL, `endDate` DATETIME NULL, + `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -1907,6 +1914,33 @@ public function update_sql_30002(): bool|array { $errors = array(); + $sql = [ + + "ALTER TABLE `zp_canvas` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_clients` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_sprints` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_projects` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_timesheets` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_tickets` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + ]; + + foreach ($sql as $statement) { + try { + $stmn = $this->database->prepare($statement); + $stmn->execute(); + } catch (PDOException $e) { + //Just swallow your pride + //One day we'll get ALTER IF EXISTS + } + } + + return true; + } + + public function update_sql_30003(): bool|array { + + $errors = array(); + $sql = [ "ALTER TABLE `zp_plugins` ADD COLUMN `license` TEXT NULL DEFAULT NULL", "ALTER TABLE `zp_plugins` ADD COLUMN `format` VARCHAR(45) NULL DEFAULT NULL", From a10bf2b76c133b6a6bae755b09cb69b9c32ec5cb Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:26:42 -0400 Subject: [PATCH 05/12] Remove project detail step from onboarding --- app/Domain/Help/Js/helperController.js | 1 + app/Domain/Help/Services/Helper.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Domain/Help/Js/helperController.js b/app/Domain/Help/Js/helperController.js index 2597127d9..dd2ed6f2a 100644 --- a/app/Domain/Help/Js/helperController.js +++ b/app/Domain/Help/Js/helperController.js @@ -206,6 +206,7 @@ leantime.helperController = (function () { confetti({ spread: 70, origin: { y: 1.2 }, + disableForReducedMotion: true }); } }, diff --git a/app/Domain/Help/Services/Helper.php b/app/Domain/Help/Services/Helper.php index 5a3660f7a..b5d4d39f8 100644 --- a/app/Domain/Help/Services/Helper.php +++ b/app/Domain/Help/Services/Helper.php @@ -77,8 +77,8 @@ public function getFirstLoginSteps(): array { $steps = array( - 0 => array("class" => "Leantime\Domain\Help\Services\ProjectIntroStep", "next" => 10), - 10 => array("class" => "Leantime\Domain\Help\Services\ProjectDefinitionStep", "next" => 20), + 0 => array("class" => "Leantime\Domain\Help\Services\ProjectIntroStep", "next" => 20), + //10 => array("class" => "Leantime\Domain\Help\Services\ProjectDefinitionStep", "next" => 20), 20 => array("class" => "Leantime\Domain\Help\Services\InviteTeamStep", "next" => "end"), ); From 4f79ea9a7befcb1facebb1edf084b61f0cc8a6a6 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:26:57 -0400 Subject: [PATCH 06/12] fix history push error for modals --- public/assets/js/app/core/modals.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/assets/js/app/core/modals.js b/public/assets/js/app/core/modals.js index d37ee572b..5b080191e 100644 --- a/public/assets/js/app/core/modals.js +++ b/public/assets/js/app/core/modals.js @@ -40,8 +40,13 @@ leantime.modals = (function () { tippy('[data-tippy-content]'); }, beforeClose: function () { - history.pushState("", document.title, window.location.pathname + window.location.search); - console.log(window.globalModalCallback); + try{ + history.pushState("", document.title, window.location.pathname + window.location.search); + + }catch(error){ + //Code to handle error comes here + console.log("Issue pushing history"); + } if(typeof window.globalModalCallback === 'function') { window.globalModalCallback(); From 6e5ea13a6f66b5d28b3d32486bb841e31574f5f3 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:27:06 -0400 Subject: [PATCH 07/12] clean up minimal theme --- public/assets/css/components/structure.css | 2 +- public/theme/minimal/css/light.css | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/assets/css/components/structure.css b/public/assets/css/components/structure.css index 88bf60279..118be6571 100644 --- a/public/assets/css/components/structure.css +++ b/public/assets/css/components/structure.css @@ -400,7 +400,7 @@ body { top: 0px; width: 100%; background-size:cover; - background-image:url(/dist/images/backgrounds/bg1.png); + background-image:url(/dist/images/backgrounds/bg5.png); background-repeat:no-repeat; background-position:center; } diff --git a/public/theme/minimal/css/light.css b/public/theme/minimal/css/light.css index 3961a5759..574024e81 100644 --- a/public/theme/minimal/css/light.css +++ b/public/theme/minimal/css/light.css @@ -17,9 +17,9 @@ --tab-active-background: rgba(230, 230, 230, 1); --tab-active-color: #555; - --primary-content-bg-opacity: 0.4; + --primary-content-bg-opacity: 0.3; - --main-titles-color: var(--accent1); + --main-titles-color: #555; --primary-background: rgba(255, 255, 255, 1); --secondary-background: #fff; @@ -63,7 +63,7 @@ --main-menu-link-bg: var(--secondary-background); --main-menu-link-color: var(--primary-font-color); - --main-menu-link-hover-bg: rgba(220, 220, 220, 0.8); + --main-menu-link-hover-bg: rgba(250, 250, 250, 0.8); --main-menu-link-hover-color: var(--accent1); --main-menu-overlayed-link-hover-bg: rgba(255, 255, 255, 0.4); From ea70e34c77e6048ecac08aee9103052537290e36 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:27:13 -0400 Subject: [PATCH 08/12] Manifest updates --- .idea/leantime-oss.iml | 2 + public/dist/mix-manifest.json | 73 +++++++---------------------------- 2 files changed, 17 insertions(+), 58 deletions(-) diff --git a/.idea/leantime-oss.iml b/.idea/leantime-oss.iml index 546a98f06..5898dd9ba 100644 --- a/.idea/leantime-oss.iml +++ b/.idea/leantime-oss.iml @@ -2,6 +2,8 @@ + + diff --git a/public/dist/mix-manifest.json b/public/dist/mix-manifest.json index 5e350dc6c..31410aae9 100644 --- a/public/dist/mix-manifest.json +++ b/public/dist/mix-manifest.json @@ -1,62 +1,19 @@ { - "/js/Auth/Js/authController.js": "/js/Auth/Js/authController.js", - "/js/Calendar/Js/calendarController.js": "/js/Calendar/Js/calendarController.js", - "/js/Canvas/Js/canvasController.js": "/js/Canvas/Js/canvasController.js", - "/js/Clients/Js/clientsController.js": "/js/Clients/Js/clientsController.js", - "/js/Comments/Js/commentsController.js": "/js/Comments/Js/commentsController.js", - "/js/Cpcanvas/Js/cpCanvasController.js": "/js/Cpcanvas/Js/cpCanvasController.js", - "/js/Dashboard/Js/dashboardController.js": "/js/Dashboard/Js/dashboardController.js", - "/js/Dbmcanvas/Js/dbmCanvasController.js": "/js/Dbmcanvas/Js/dbmCanvasController.js", - "/js/Eacanvas/Js/eaCanvasController.js": "/js/Eacanvas/Js/eaCanvasController.js", - "/js/Emcanvas/Js/emCanvasController.js": "/js/Emcanvas/Js/emCanvasController.js", - "/js/Gamecenter/Js/game-snake.js": "/js/Gamecenter/Js/game-snake.js", - "/js/Goalcanvas/Js/goalCanvasController.js": "/js/Goalcanvas/Js/goalCanvasController.js", - "/js/Help/Js/helperController.js": "/js/Help/Js/helperController.js", - "/js/Help/Js/helperRepository.js": "/js/Help/Js/helperRepository.js", - "/js/Ideas/Js/ideasController.js": "/js/Ideas/Js/ideasController.js", - "/js/Insightscanvas/Js/insightsCanvasController.js": "/js/Insightscanvas/Js/insightsCanvasController.js", - "/js/Lbmcanvas/Js/lbmCanvasController.js": "/js/Lbmcanvas/Js/lbmCanvasController.js", - "/js/Leancanvas/Js/leanCanvasController.js": "/js/Leancanvas/Js/leanCanvasController.js", - "/js/Menu/Js/menuController.js": "/js/Menu/Js/menuController.js", - "/js/Menu/Js/menuRepository.js": "/js/Menu/Js/menuRepository.js", - "/js/Minempathycanvas/Js/risksCanvasController.js": "/js/Minempathycanvas/Js/risksCanvasController.js", - "/js/Obmcanvas/Js/obmCanvasController.js": "/js/Obmcanvas/Js/obmCanvasController.js", - "/js/Projects/Js/projectsController.js": "/js/Projects/Js/projectsController.js", - "/js/Reactions/Js/reactionsController.js": "/js/Reactions/Js/reactionsController.js", - "/js/Retroscanvas/Js/retroCanvasController.js": "/js/Retroscanvas/Js/retroCanvasController.js", - "/js/Riskscanvas/Js/risksCanvasController.js": "/js/Riskscanvas/Js/risksCanvasController.js", - "/js/Sbcanvas/Js/sbCanvasController.js": "/js/Sbcanvas/Js/sbCanvasController.js", - "/js/Setting/Js/settingController.js": "/js/Setting/Js/settingController.js", - "/js/Setting/Js/settingRepository.js": "/js/Setting/Js/settingRepository.js", - "/js/Setting/Js/settingService.js": "/js/Setting/Js/settingService.js", - "/js/Smcanvas/Js/smCanvasController.js": "/js/Smcanvas/Js/smCanvasController.js", - "/js/Sqcanvas/Js/sqCanvasController.js": "/js/Sqcanvas/Js/sqCanvasController.js", - "/js/Swotcanvas/Js/swotCanvasController.js": "/js/Swotcanvas/Js/swotCanvasController.js", - "/js/Tickets/Js/ticketsController.js": "/js/Tickets/Js/ticketsController.js", - "/js/Tickets/Js/ticketsRepository.js": "/js/Tickets/Js/ticketsRepository.js", - "/js/Timesheets/Js/timesheetsController.js": "/js/Timesheets/Js/timesheetsController.js", - "/js/Users/Js/usersController.js": "/js/Users/Js/usersController.js", - "/js/Users/Js/usersRepository.js": "/js/Users/Js/usersRepository.js", - "/js/Users/Js/usersService.js": "/js/Users/Js/usersService.js", - "/js/Valuecanvas/Js/valueCanvasController.js": "/js/Valuecanvas/Js/valueCanvasController.js", - "/js/Widgets/Js/Widgetcontroller.js": "/js/Widgets/Js/Widgetcontroller.js", - "/js/Wiki/Js/wikiController.js": "/js/Wiki/Js/wikiController.js", - "/js/compiled-htmx.3.2.0-beta.min.js": "/js/compiled-htmx.3.2.0-beta.min.js", - "/js/compiled-htmx-headSupport.3.2.0-beta.min.js": "/js/compiled-htmx-headSupport.3.2.0-beta.min.js", - "/js/authController.js": "/js/authController.js", - "/css/main.3.2.0-beta.min.css": "/css/main.3.2.0-beta.min.css", - "/css/editor.3.2.0-beta.min.css": "/css/editor.3.2.0-beta.min.css", - "/css/app.3.2.0-beta.min.css": "/css/app.3.2.0-beta.min.css", - "/js/compiled-footer.3.2.0-beta.min.js": "/js/compiled-footer.3.2.0-beta.min.js", - "/js/compiled-app.3.2.0-beta.min.js": "/js/compiled-app.3.2.0-beta.min.js", - "/js/compiled-frameworks.3.2.0-beta.min.js": "/js/compiled-frameworks.3.2.0-beta.min.js", - "/js/compiled-framework-plugins.3.2.0-beta.min.js": "/js/compiled-framework-plugins.3.2.0-beta.min.js", - "/js/compiled-global-component.3.2.0-beta.min.js": "/js/compiled-global-component.3.2.0-beta.min.js", - "/js/compiled-calendar-component.3.2.0-beta.min.js": "/js/compiled-calendar-component.3.2.0-beta.min.js", - "/js/compiled-table-component.3.2.0-beta.min.js": "/js/compiled-table-component.3.2.0-beta.min.js", - "/js/compiled-editor-component.3.2.0-beta.min.js": "/js/compiled-editor-component.3.2.0-beta.min.js", - "/js/compiled-gantt-component.3.2.0-beta.min.js": "/js/compiled-gantt-component.3.2.0-beta.min.js", - "/js/compiled-chart-component.3.2.0-beta.min.js": "/js/compiled-chart-component.3.2.0-beta.min.js", + "/js/compiled-htmx.3.2.0-beta-2.min.js": "/js/compiled-htmx.3.2.0-beta-2.min.js", + "/js/compiled-htmx-headSupport.3.2.0-beta-2.min.js": "/js/compiled-htmx-headSupport.3.2.0-beta-2.min.js", + "/css/main.3.2.0-beta-2.min.css": "/css/main.3.2.0-beta-2.min.css", + "/css/editor.3.2.0-beta-2.min.css": "/css/editor.3.2.0-beta-2.min.css", + "/css/app.3.2.0-beta-2.min.css": "/css/app.3.2.0-beta-2.min.css", + "/js/compiled-footer.3.2.0-beta-2.min.js": "/js/compiled-footer.3.2.0-beta-2.min.js", + "/js/compiled-app.3.2.0-beta-2.min.js": "/js/compiled-app.3.2.0-beta-2.min.js", + "/js/compiled-frameworks.3.2.0-beta-2.min.js": "/js/compiled-frameworks.3.2.0-beta-2.min.js", + "/js/compiled-framework-plugins.3.2.0-beta-2.min.js": "/js/compiled-framework-plugins.3.2.0-beta-2.min.js", + "/js/compiled-global-component.3.2.0-beta-2.min.js": "/js/compiled-global-component.3.2.0-beta-2.min.js", + "/js/compiled-calendar-component.3.2.0-beta-2.min.js": "/js/compiled-calendar-component.3.2.0-beta-2.min.js", + "/js/compiled-table-component.3.2.0-beta-2.min.js": "/js/compiled-table-component.3.2.0-beta-2.min.js", + "/js/compiled-editor-component.3.2.0-beta-2.min.js": "/js/compiled-editor-component.3.2.0-beta-2.min.js", + "/js/compiled-gantt-component.3.2.0-beta-2.min.js": "/js/compiled-gantt-component.3.2.0-beta-2.min.js", + "/js/compiled-chart-component.3.2.0-beta-2.min.js": "/js/compiled-chart-component.3.2.0-beta-2.min.js", "/images/03-1.png": "/images/03-1.png", "/images/32px.png": "/images/32px.png", "/images/40px.png": "/images/40px.png", From 4be81039d89c10edea4fc1e9646d215a57d3fb13 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 09:46:21 -0400 Subject: [PATCH 09/12] Update release.yml --- .github/workflows/release.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35e149768..d9e81ae18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,10 @@ jobs: changelog_filename: CHANGELOG.md release_version: ${{ steps.version.outputs.version }} config_file: .github/workflows/changelogConfig.yml - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Extract Repo Attributes + id: attrs + uses: ibnesayeed/repo-attrs@master - name: release uses: ncipollo/release-action@v1 id: create_release @@ -44,7 +47,24 @@ jobs: tag: v${{ steps.version.outputs.version }} generateReleaseNotes: false makeLatest: true - body: ${{ steps.changelog_ci.outputs.changelog }} + body: | + ## Changes in this Release + + History from `${{ steps.attrs.outputs.tail }}` to `${{ steps.attrs.outputs.head }}` + + ### Commits + + ${{ steps.attrs.outputs.commits }} + + ### Contributors + + ${{ steps.attrs.outputs.contributors }} + + ### Files + + ``` + ${{ steps.attrs.outputs.files }} + ``` env: GITHUB_TOKEN: ${{ github.token }} - name: upload zip From 6cd8c8ded347339e0e096ae82a6820750ee78ac1 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 10:35:22 -0400 Subject: [PATCH 10/12] Fix csvimport --- app/Domain/Connector/Models/Integration.php | 12 ++++++++++++ app/Domain/CsvImport/Services/CsvImport.php | 2 +- app/Domain/Install/Repositories/Install.php | 18 ++++++++---------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/Domain/Connector/Models/Integration.php b/app/Domain/Connector/Models/Integration.php index e28a69d6d..cf84b4ac9 100644 --- a/app/Domain/Connector/Models/Integration.php +++ b/app/Domain/Connector/Models/Integration.php @@ -7,28 +7,40 @@ */ class Integration { + #[DbColumn('id')] public int $id; + #[DbColumn('providerId')] public ?string $providerId; + #[DbColumn('method')] public ?string $method; + #[DbColumn('entity')] public ?string $entity; + #[DbColumn('fields')] public ?string $fields; + #[DbColumn('schedule')] public ?string $schedule; + #[DbColumn('notes')] public ?string $notes; + #[DbColumn('auth')] public ?string $auth; + #[DbColumn('meta')] public ?string $meta; + #[DbColumn('createdOn')] public ?string $createdOn; + #[DbColumn('createdBy')] public ?string $createdBy; + #[DbColumn('lastSync')] public ?string $lastSync; diff --git a/app/Domain/CsvImport/Services/CsvImport.php b/app/Domain/CsvImport/Services/CsvImport.php index 55ab138e8..1be87f2dd 100644 --- a/app/Domain/CsvImport/Services/CsvImport.php +++ b/app/Domain/CsvImport/Services/CsvImport.php @@ -39,7 +39,7 @@ public function __construct() $this->id = "csv_importer"; $this->name = "CSV Import"; $this->image = "/dist/images/svg/csv-icon.svg"; - $this->description = "Impport data from a CSV file. To learn more about the CSV format, please visit our documentation"; + $this->description = "Impport data from a CSV file. To learn more about the CSV format, please visit our documentation"; $this->methods[] = "import, update"; diff --git a/app/Domain/Install/Repositories/Install.php b/app/Domain/Install/Repositories/Install.php index c3cd1d333..3eed7d9f0 100644 --- a/app/Domain/Install/Repositories/Install.php +++ b/app/Domain/Install/Repositories/Install.php @@ -528,7 +528,6 @@ private function sqlPrep(): string `avatar` MEDIUMTEXT NULL , `cover` MEDIUMTEXT NULL, `sortIndex` INT(11) NULL, - `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -1915,13 +1914,8 @@ public function update_sql_30002(): bool|array { $errors = array(); $sql = [ - - "ALTER TABLE `zp_canvas` ADD COLUMN `modified` datetime NULL DEFAULT NULL", - "ALTER TABLE `zp_clients` ADD COLUMN `modified` datetime NULL DEFAULT NULL", - "ALTER TABLE `zp_sprints` ADD COLUMN `modified` datetime NULL DEFAULT NULL", - "ALTER TABLE `zp_projects` ADD COLUMN `modified` datetime NULL DEFAULT NULL", - "ALTER TABLE `zp_timesheets` ADD COLUMN `modified` datetime NULL DEFAULT NULL", - "ALTER TABLE `zp_tickets` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_plugins` ADD COLUMN `license` TEXT NULL DEFAULT NULL", + "ALTER TABLE `zp_plugins` ADD COLUMN `format` VARCHAR(45) NULL DEFAULT NULL", ]; foreach ($sql as $statement) { @@ -1942,8 +1936,12 @@ public function update_sql_30003(): bool|array { $errors = array(); $sql = [ - "ALTER TABLE `zp_plugins` ADD COLUMN `license` TEXT NULL DEFAULT NULL", - "ALTER TABLE `zp_plugins` ADD COLUMN `format` VARCHAR(45) NULL DEFAULT NULL", + "ALTER TABLE `zp_canvas` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_clients` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_sprints` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_projects` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_timesheets` ADD COLUMN `modified` datetime NULL DEFAULT NULL", + "ALTER TABLE `zp_tickets` ADD COLUMN `modified` datetime NULL DEFAULT NULL", ]; foreach ($sql as $statement) { From 375d700cf618a5e7d072c734d90c4852633341d3 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 10:59:18 -0400 Subject: [PATCH 11/12] phpstan update --- package-lock.json | 4 ++-- phpstan.neon | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 19c0d9260..5f80a3b35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "leantime", - "version": "3.2.0-beta", + "version": "3.2.0-beta-2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "leantime", - "version": "3.2.0-beta", + "version": "3.2.0-beta-2", "license": "AGPL-3.0", "dependencies": { "@assuradeurengilde/fontawesome-iconpicker": "^3.2.3", diff --git a/phpstan.neon b/phpstan.neon index a51f47974..4071f13c9 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -18,9 +18,9 @@ parameters: - config ignoreErrors: # Rules for level 1. Templates use variables through include which are not detected by phpstan - #- - # messages: - # - '#Variable \$tpl might not be defined\.#' + - + messages: + - '#Attribute class Leantime\\Domain\\Connector\\Models\\DbColumn does not exist\.#' # - '#Variable \$__data might not be defined\.#' # - '#Constant BASE_URL not found\.#' # - '#Constant CURRENT_URL not found\.#' From b3002192b2e9ed60646bf07ea172c875deca61b5 Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Wed, 24 Jul 2024 11:01:31 -0400 Subject: [PATCH 12/12] Fix ambiguous modified field --- app/Domain/Users/Repositories/Users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Domain/Users/Repositories/Users.php b/app/Domain/Users/Repositories/Users.php index 4abf4a9d3..a01ed79e0 100644 --- a/app/Domain/Users/Repositories/Users.php +++ b/app/Domain/Users/Repositories/Users.php @@ -282,7 +282,7 @@ public function getAll($activeOnly = false): array jobTitle, jobLevel, department, - modified + zp_user.modified FROM `zp_user` LEFT JOIN zp_clients ON zp_clients.id = zp_user.clientId WHERE !(source <=> 'api')";