From 7814414f1dfd10744e3b44494005cfb8198ac8d5 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Tue, 8 Jul 2025 13:54:56 -0400 Subject: [PATCH 01/22] FOUR-25243 --- ProcessMaker/Models/Screen.php | 10 ++++ database/seeders/ScreenEmailSeeder.php | 2 +- tests/unit/ScreenEmailSeederTest.php | 54 +++++++++++++++++++ ...mail_task_notification_screen_category.php | 54 +++++++++++++++++++ 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 tests/unit/ScreenEmailSeederTest.php create mode 100644 upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php diff --git a/ProcessMaker/Models/Screen.php b/ProcessMaker/Models/Screen.php index d8d16a8987..e24abae580 100644 --- a/ProcessMaker/Models/Screen.php +++ b/ProcessMaker/Models/Screen.php @@ -305,6 +305,16 @@ public static function getScreenByKey(string $key) : ?self return $screen; } + public static function getScreenByKeyNonSystem(string $key) : ?self + { + $screen = self::firstWhere('key', $key); + if (!$screen) { + $screen = self::createScreenByKey($key, false); + } + + return $screen; + } + private static function createScreenByKey(string $key, bool $isSystem = true, string $path = null): self { // If no path is provided, use the default path diff --git a/database/seeders/ScreenEmailSeeder.php b/database/seeders/ScreenEmailSeeder.php index 3e5260dfdc..229536f506 100644 --- a/database/seeders/ScreenEmailSeeder.php +++ b/database/seeders/ScreenEmailSeeder.php @@ -14,6 +14,6 @@ class ScreenEmailSeeder extends Seeder */ public function run() { - return Screen::getScreenByKey('default-email-task-notification'); + return Screen::getScreenByKeyNonSystem('default-email-task-notification'); } } diff --git a/tests/unit/ScreenEmailSeederTest.php b/tests/unit/ScreenEmailSeederTest.php new file mode 100644 index 0000000000..e204dda96a --- /dev/null +++ b/tests/unit/ScreenEmailSeederTest.php @@ -0,0 +1,54 @@ +artisan('migrate', [ + '--path' => 'upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php', + ])->run(); + } + + public function test_seeder_creates_screen_without_system_flag() + { + $seeder = new ScreenEmailSeeder(); + $seeder->run(); + + $screen = Screen::where('key', 'default-email-task-notification')->first(); + + $this->assertNotNull($screen); + $this->assertEquals('default-email-task-notification', $screen->key); + + $systemCategory = ScreenCategory::where('name', 'System')->first(); + if ($systemCategory) { + $this->assertFalse($screen->categories()->where('category_id', $systemCategory->id)->exists()); + } + + $this->assertNull($screen->screen_category_id); + } + + public function test_get_screen_by_key_non_system_method() + { + $screen = Screen::getScreenByKeyNonSystem('default-email-task-notification'); + + $this->assertNotNull($screen); + $this->assertEquals('default-email-task-notification', $screen->key); + + $systemCategory = ScreenCategory::where('name', 'System')->first(); + if ($systemCategory) { + $this->assertFalse($screen->categories()->where('category_id', $systemCategory->id)->exists()); + } + + $this->assertNull($screen->screen_category_id); + } +} diff --git a/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php b/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php new file mode 100644 index 0000000000..5b2503be37 --- /dev/null +++ b/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php @@ -0,0 +1,54 @@ +first(); + + if ($screen) { + // Remove the screen from the System category + $systemCategory = ScreenCategory::where('is_system', 1)->first(); + + if ($systemCategory) { + $screen->categories()->detach($systemCategory->id); + } + + // Set screen_category_id to null to remove any category association + $screen->update(['screen_category_id' => null]); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // Find the default email task notification screen + $screen = Screen::where('key', 'default-email-task-notification')->first(); + + if ($screen) { + // Re-add the screen to the System category + $systemCategory = ScreenCategory::where('is_system', 1)->first(); + + if ($systemCategory) { + $screen->categories()->attach($systemCategory->id); + $screen->update(['screen_category_id' => $systemCategory->id]); + } + } + } +} From 698e6b15bd2966d61a4e7f226ccebaffbe41b9d4 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Tue, 8 Jul 2025 14:09:50 -0400 Subject: [PATCH 02/22] FOUR-25243: Rename the title of the screen --- .../processes/screens/default-email-task-notification.json | 4 ++-- tests/unit/ScreenEmailSeederTest.php | 7 ------- ...ate_default_email_task_notification_screen_category.php | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index b3eb5e2400..fa99f63907 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -4,12 +4,12 @@ "screens": [ { "screen_category_id": null, - "title": "DEFAULT_EMAIL_TASK_NOTIFICATION", + "title": "Default Email Task Notification", "description": "Screen for the email task notification", "type": "EMAIL", "config": [ { - "name": "DEFAULT_EMAIL_TASK_NOTIFICATION", + "name": "Default Email Task Notification", "items": [ { "uuid": "c331f828-3b0f-47a3-bf6e-9037717a7690", diff --git a/tests/unit/ScreenEmailSeederTest.php b/tests/unit/ScreenEmailSeederTest.php index e204dda96a..3abd9a0ada 100644 --- a/tests/unit/ScreenEmailSeederTest.php +++ b/tests/unit/ScreenEmailSeederTest.php @@ -12,13 +12,6 @@ class ScreenEmailSeederTest extends TestCase { use RefreshDatabase; - private function upgrade() - { - $this->artisan('migrate', [ - '--path' => 'upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php', - ])->run(); - } - public function test_seeder_creates_screen_without_system_flag() { $seeder = new ScreenEmailSeeder(); diff --git a/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php b/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php index 5b2503be37..0c51a7edb7 100644 --- a/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php +++ b/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php @@ -27,7 +27,7 @@ public function up() } // Set screen_category_id to null to remove any category association - $screen->update(['screen_category_id' => null]); + $screen->update(['screen_category_id' => null, 'title' => 'Default Email Task Notification']); } } @@ -47,7 +47,7 @@ public function down() if ($systemCategory) { $screen->categories()->attach($systemCategory->id); - $screen->update(['screen_category_id' => $systemCategory->id]); + $screen->update(['screen_category_id' => $systemCategory->id, 'title' => 'DEFAULT_EMAIL_TASK_NOTIFICATION']); } } } From 10dc094228d098df9b91735aef7f9b81fc3d89f6 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 9 Jul 2025 18:27:05 -0400 Subject: [PATCH 03/22] FOUR-25239: Create a migration with is_default_column --- ...5813_add_is_default_column_for_screens.php | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 database/migrations/2025_07_09_215813_add_is_default_column_for_screens.php diff --git a/database/migrations/2025_07_09_215813_add_is_default_column_for_screens.php b/database/migrations/2025_07_09_215813_add_is_default_column_for_screens.php new file mode 100644 index 0000000000..644cde6acc --- /dev/null +++ b/database/migrations/2025_07_09_215813_add_is_default_column_for_screens.php @@ -0,0 +1,27 @@ +boolean('is_default')->default(false); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('screens', function (Blueprint $table) { + $table->dropColumn('is_default'); + }); + } +}; From d6cce77d323518b93541ea0d500336f656d3c33f Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 9 Jul 2025 18:30:58 -0400 Subject: [PATCH 04/22] FOUR-25242: Prevent the delete of Default Email Task Notification --- ProcessMaker/Http/Controllers/Api/ScreenController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ProcessMaker/Http/Controllers/Api/ScreenController.php b/ProcessMaker/Http/Controllers/Api/ScreenController.php index c7459c9fbf..943618b81b 100644 --- a/ProcessMaker/Http/Controllers/Api/ScreenController.php +++ b/ProcessMaker/Http/Controllers/Api/ScreenController.php @@ -482,6 +482,14 @@ public function duplicate(Screen $screen, Request $request) */ public function destroy(Screen $screen) { + // Check if the screen is a default screen + if ($screen->is_default == 1) { + return response([ + 'message' => 'Cannot delete a default screen', + 'errors' => ['is_default' => 'Default screens cannot be deleted'], + ], 422); + } + $screen->delete(); // Call new event to store changes in LOG ScreenDeleted::dispatch($screen); From e5406422059c28f484986ca943e9fcc2bb0d4644 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 9 Jul 2025 18:49:59 -0400 Subject: [PATCH 05/22] FOUR-25239: Set with the flag the Screen --- ProcessMaker/Models/Screen.php | 7 ++++--- database/seeders/ScreenEmailSeeder.php | 2 +- ...ate_default_email_task_notification_screen_category.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ProcessMaker/Models/Screen.php b/ProcessMaker/Models/Screen.php index e24abae580..71c1953127 100644 --- a/ProcessMaker/Models/Screen.php +++ b/ProcessMaker/Models/Screen.php @@ -305,17 +305,17 @@ public static function getScreenByKey(string $key) : ?self return $screen; } - public static function getScreenByKeyNonSystem(string $key) : ?self + public static function getScreenByKeyPerDefault(string $key) : ?self { $screen = self::firstWhere('key', $key); if (!$screen) { - $screen = self::createScreenByKey($key, false); + $screen = self::createScreenByKey($key, false, null, 1); } return $screen; } - private static function createScreenByKey(string $key, bool $isSystem = true, string $path = null): self + private static function createScreenByKey(string $key, bool $isSystem = true, string $path = null, $isDefault = 0): self { // If no path is provided, use the default path if (!$path) { @@ -349,6 +349,7 @@ private static function createScreenByKey(string $key, bool $isSystem = true, st // Create new screen unset($screen['categories']); $screen['screen_category_id'] = null; + $screen['is_default'] = $isDefault; if ($newScreen) { $newScreen->fill($screen); diff --git a/database/seeders/ScreenEmailSeeder.php b/database/seeders/ScreenEmailSeeder.php index 229536f506..e72a4dbf17 100644 --- a/database/seeders/ScreenEmailSeeder.php +++ b/database/seeders/ScreenEmailSeeder.php @@ -14,6 +14,6 @@ class ScreenEmailSeeder extends Seeder */ public function run() { - return Screen::getScreenByKeyNonSystem('default-email-task-notification'); + return Screen::getScreenByKeyPerDefault('default-email-task-notification'); } } diff --git a/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php b/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php index 0c51a7edb7..668a8bc2fd 100644 --- a/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php +++ b/upgrades/2025_07_08_151252_update_default_email_task_notification_screen_category.php @@ -27,7 +27,7 @@ public function up() } // Set screen_category_id to null to remove any category association - $screen->update(['screen_category_id' => null, 'title' => 'Default Email Task Notification']); + $screen->update(['screen_category_id' => null, 'title' => 'Default Email Task Notification', 'is_default' => 1]); } } From 51a3695ce30ad708363924d603a01f85858d945b Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 9 Jul 2025 21:23:39 -0400 Subject: [PATCH 06/22] Adding the screens_versions --- .../2025_07_09_215813_add_is_default_column_for_screens.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/database/migrations/2025_07_09_215813_add_is_default_column_for_screens.php b/database/migrations/2025_07_09_215813_add_is_default_column_for_screens.php index 644cde6acc..3a58d8f0aa 100644 --- a/database/migrations/2025_07_09_215813_add_is_default_column_for_screens.php +++ b/database/migrations/2025_07_09_215813_add_is_default_column_for_screens.php @@ -13,6 +13,9 @@ public function up(): void Schema::table('screens', function (Blueprint $table) { $table->boolean('is_default')->default(false); }); + Schema::table('screen_versions', function (Blueprint $table) { + $table->boolean('is_default')->default(false); + }); } /** @@ -23,5 +26,8 @@ public function down(): void Schema::table('screens', function (Blueprint $table) { $table->dropColumn('is_default'); }); + Schema::table('screen_versions', function (Blueprint $table) { + $table->dropColumn('is_default'); + }); } }; From 9007bb6562de900bb06ce1fe2f67e915a72444ec Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 9 Jul 2025 22:15:16 -0400 Subject: [PATCH 07/22] FOUR-25246 --- resources/views/shared/users/sidebar.blade.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/resources/views/shared/users/sidebar.blade.php b/resources/views/shared/users/sidebar.blade.php index 61ea8d3183..68a60d4853 100644 --- a/resources/views/shared/users/sidebar.blade.php +++ b/resources/views/shared/users/sidebar.blade.php @@ -95,18 +95,6 @@ @endif -
-
- {{__('Task Notifications Email')}} -
-
-
- {{ html()->checkbox('email_task_notification', 1, false)->id('email_task_notification')->class('custom-control-input')->attribute('v-model', 'formData.email_task_notification') }} - -
-
-
- @isset($addons) @foreach ($addons as $addon) {!! $addon['content'] ?? '' !!} From 73df2b57efae7950d7635058819cb70431bea930 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 9 Jul 2025 22:25:17 -0400 Subject: [PATCH 08/22] Fixing unit test issue --- tests/unit/ScreenEmailSeederTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/ScreenEmailSeederTest.php b/tests/unit/ScreenEmailSeederTest.php index 3abd9a0ada..638d3ddd8c 100644 --- a/tests/unit/ScreenEmailSeederTest.php +++ b/tests/unit/ScreenEmailSeederTest.php @@ -32,7 +32,7 @@ public function test_seeder_creates_screen_without_system_flag() public function test_get_screen_by_key_non_system_method() { - $screen = Screen::getScreenByKeyNonSystem('default-email-task-notification'); + $screen = Screen::getScreenByKeyPerDefault('default-email-task-notification'); $this->assertNotNull($screen); $this->assertEquals('default-email-task-notification', $screen->key); @@ -43,5 +43,6 @@ public function test_get_screen_by_key_non_system_method() } $this->assertNull($screen->screen_category_id); + $this->assertEquals($screen->is_default, 1); } } From 2484edf4fdda8e9f5e0d3ddc20b5e5edc5d57121 Mon Sep 17 00:00:00 2001 From: Fabio Date: Thu, 10 Jul 2025 10:17:39 -0400 Subject: [PATCH 09/22] FOUR-25240:Implement property linkDisplayStyle = [LINK, BUTTON] --- resources/img/arrow_top_right.svg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 resources/img/arrow_top_right.svg diff --git a/resources/img/arrow_top_right.svg b/resources/img/arrow_top_right.svg new file mode 100644 index 0000000000..58dacc1c1b --- /dev/null +++ b/resources/img/arrow_top_right.svg @@ -0,0 +1,3 @@ + + + From 9f6456526f27e89117f3671a57ff3757ed1cdb58 Mon Sep 17 00:00:00 2001 From: Henry Jonas Date: Fri, 11 Jul 2025 14:19:47 -0400 Subject: [PATCH 10/22] FOUR-25228: Create default email notification config when task is created in Modeler --- .../Controllers/Process/ModelerController.php | 13 ++++++ resources/js/processes/modeler/modelerInit.js | 43 +++++++++++++------ .../views/processes/modeler/index.blade.php | 3 ++ 3 files changed, 46 insertions(+), 13 deletions(-) diff --git a/ProcessMaker/Http/Controllers/Process/ModelerController.php b/ProcessMaker/Http/Controllers/Process/ModelerController.php index 6e7ac436cb..1f55860e04 100644 --- a/ProcessMaker/Http/Controllers/Process/ModelerController.php +++ b/ProcessMaker/Http/Controllers/Process/ModelerController.php @@ -125,6 +125,18 @@ public function prepareModelerData( $process->load('alternativeInfo'); } + $defaultEmailNotification = [ + 'subject' => "RE: {{_user.fullName}} assigned you in {{taskName}}", + 'type' => "screen", + 'screenRef' => 2, + 'toRecipients' => [ + [ + 'type' => "assignedUser", + 'value' => null + ] + ], + ]; + return [ 'process' => $process, 'manager' => $manager, @@ -147,6 +159,7 @@ public function prepareModelerData( 'alternative' => $alternative, 'abPublish' => PackageHelper::isPackageInstalled('ProcessMaker\Package\PackageABTesting\PackageServiceProvider'), 'launchpad' => ProcessLaunchpad::getLaunchpad(true, $process->id), + 'defaultEmailNotification' => $defaultEmailNotification, ]; } diff --git a/resources/js/processes/modeler/modelerInit.js b/resources/js/processes/modeler/modelerInit.js index 9722d04267..d6e6ba92cc 100644 --- a/resources/js/processes/modeler/modelerInit.js +++ b/resources/js/processes/modeler/modelerInit.js @@ -1,24 +1,41 @@ -import { nextTick } from "vue"; - export default {}; // Highlight the node when it is added // TODO: This is a workaround to highlight the node when it is added // because the highlightNode method is not working when the node is added export const configureTaskNotifications = ({ modeler }) => { - modeler.$on("node-added", (node) => { - if (node.type.includes("task") && node.notifications) { - node.notifications.assignee = { - assigned: true, - completed: false, - due: true, - default: false, + modeler.$on("before-node-added", (node) => { + if (node.type.includes("task") && !node.notifications) { + node.notifications = { + assignee: { + assigned: true, + completed: false, + due: true, + default: false, + }, + requester : { + assigned: false, + completed: false, + due: false, + }, + participants : { + assigned: false, + completed: false, + due: false, + }, + manager : { + assigned: false, + completed: false, + due: false, + }, + }; + } + + if (node.type.includes("task") && !node.config) { + node.config = { + email_notifications: {}, }; } - modeler.clearSelection(); - nextTick(() => { - modeler.highlightNode(node); - }); }); }; diff --git a/resources/views/processes/modeler/index.blade.php b/resources/views/processes/modeler/index.blade.php index 4cd8fe38ae..b142dd0f68 100644 --- a/resources/views/processes/modeler/index.blade.php +++ b/resources/views/processes/modeler/index.blade.php @@ -61,6 +61,8 @@ }, ] + window.ProcessMaker.defaultEmailNotification = @json($defaultEmailNotification); + window.ProcessMaker.multiplayer = { broadcaster: "{{config('multiplayer.default')}}", host: "{{config('multiplayer.url')}}", @@ -103,6 +105,7 @@ } const warnings = @json($process->warnings); + console.log("window.ProcessMaker.EventBus"); window.ProcessMaker.EventBus.$on('modeler-start', ({ loadXML, addWarnings, addBreadcrumbs }) => { loadXML(window.ProcessMaker.modeler.xml); addWarnings(warnings || []); From ac4d48b051336d92d6bcfe5b8a7d62d264322fb4 Mon Sep 17 00:00:00 2001 From: Henry Jonas Date: Fri, 11 Jul 2025 14:26:46 -0400 Subject: [PATCH 11/22] FOUR-25228: Create default email notification config when task is created in Modeler --- resources/views/processes/modeler/index.blade.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/views/processes/modeler/index.blade.php b/resources/views/processes/modeler/index.blade.php index b142dd0f68..621fa3550c 100644 --- a/resources/views/processes/modeler/index.blade.php +++ b/resources/views/processes/modeler/index.blade.php @@ -105,7 +105,6 @@ } const warnings = @json($process->warnings); - console.log("window.ProcessMaker.EventBus"); window.ProcessMaker.EventBus.$on('modeler-start', ({ loadXML, addWarnings, addBreadcrumbs }) => { loadXML(window.ProcessMaker.modeler.xml); addWarnings(warnings || []); From 02a0fa7d947a2a4cd420c7b3d1aa6771aa653d9e Mon Sep 17 00:00:00 2001 From: Henry Jonas Date: Fri, 11 Jul 2025 16:22:23 -0400 Subject: [PATCH 12/22] FOUR-25228: Create default email notification config when task is created in Modeler --- .../Controllers/Process/ModelerController.php | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/ProcessMaker/Http/Controllers/Process/ModelerController.php b/ProcessMaker/Http/Controllers/Process/ModelerController.php index 1f55860e04..339f1e911e 100644 --- a/ProcessMaker/Http/Controllers/Process/ModelerController.php +++ b/ProcessMaker/Http/Controllers/Process/ModelerController.php @@ -20,6 +20,7 @@ use ProcessMaker\Package\Cdata\Http\Controllers\Api\CdataController; use ProcessMaker\Package\PackagePmBlocks\Http\Controllers\Api\PmBlockController; use ProcessMaker\PackageHelper; +use ProcessMaker\Models\Screen; use ProcessMaker\Traits\HasControllerAddons; use ProcessMaker\Traits\ProcessMapTrait; @@ -125,17 +126,7 @@ public function prepareModelerData( $process->load('alternativeInfo'); } - $defaultEmailNotification = [ - 'subject' => "RE: {{_user.fullName}} assigned you in {{taskName}}", - 'type' => "screen", - 'screenRef' => 2, - 'toRecipients' => [ - [ - 'type' => "assignedUser", - 'value' => null - ] - ], - ]; + $defaultEmailNotification = $this->getDefaultEmailNotification(); return [ 'process' => $process, @@ -163,6 +154,32 @@ public function prepareModelerData( ]; } + /** + * Get the default email notification configuration for tasks + * + * Returns an array containing the default email notification settings including: + * - subject: The default email subject template + * - type: The notification type (screen) + * - screenRef: The ID of the default email notification screen + * - toRecipients: Array of default recipients (assigned user) + * @return array{screenRef: mixed, subject: string, toRecipients: array, type: string} + */ + private function getDefaultEmailNotification(): array + { + $screen = Screen::getScreenByKey('default-email-task-notification'); + return [ + 'subject' => "RE: {{_user.fullName}} assigned you in {{taskName}}", + 'type' => "screen", + 'screenRef' => $screen->id, + 'toRecipients' => [ + [ + 'type' => "assignedUser", + 'value' => null + ] + ], + ]; + } + /** * Invokes the Modeler for In-flight Process Map rendering. */ From 299f67b50438cf97993c947531baf4396bcce82b Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Fri, 11 Jul 2025 18:42:11 -0400 Subject: [PATCH 13/22] FOUR-25246: Delete the Backend changes related to the Task Notifications Email --- ProcessMaker/Repositories/TokenRepository.php | 69 ------------------- tests/Feature/TaskControllerTest.php | 29 -------- 2 files changed, 98 deletions(-) diff --git a/ProcessMaker/Repositories/TokenRepository.php b/ProcessMaker/Repositories/TokenRepository.php index 25ad6eeabf..e98a967622 100644 --- a/ProcessMaker/Repositories/TokenRepository.php +++ b/ProcessMaker/Repositories/TokenRepository.php @@ -176,10 +176,6 @@ public function persistActivityActivated(ActivityInterface $activity, TokenInter if (!is_null($user)) { // Review if the task has enable the action by email $this->validateAndSendActionByEmail($activity, $token, $user->email); - // Review if the user has enable the email notification - $isEmailTaskValid = $this->validateEmailUserNotification($token, $user); - // Define the flag if the email needs to sent - $token->is_emailsent = $isEmailTaskValid ? 1 : 0; } $this->instanceRepository->persistInstanceUpdated($token->getInstance()); } @@ -231,71 +227,6 @@ private function validateAndSendActionByEmail(ActivityInterface $activity, Token } } - /** - * Validates the user's email notification settings and sends an email if enabled. - * - * @param TokenInterface $token The token containing task information. - * @param User $user The user to whom the email notification will be sent. - * @return mixed|null Returns the result of the email sending operation or null if not sent. - */ - private function validateEmailUserNotification(TokenInterface $token, User $user) - { - try { - Log::Info('User isEmailTaskEnable: ' . $user->email_task_notification); - // Return if email task notification is not enabled or email is empty - if ($user->email_task_notification === 0 || empty($user->email)) { - return null; - } - // Prepare data for the email - $data = $this->prepareEmailData($token, $user); - - // Send Email - return (new TaskActionByEmail())->sendAbeEmail($data['configEmail'], $user->email, $data['emailData']); - } catch (\Exception $e) { - // Catch and log the error - Log::error('Failed to validate and send email task notification', [ - 'error' => $e->getMessage(), - ]); - } - } - - /** - * Prepares the email data and configuration for sending an email notification. - * - * @param TokenInterface $token The token containing task information. - * @param User $user The user for whom the email data is being prepared. - * @return array An associative array containing 'emailData' and 'configEmail'. - */ - private function prepareEmailData(TokenInterface $token, User $user) - { - // Get the case - $caseTitle = ProcessRequest::where('id', $token->process_request_id)->value('case_title'); - // Prepare the email data - $taskName = $token->element_name ?? ''; - $emailData = [ - 'firstname' => $user->firstname ?? '', - 'assigned_by' => Auth::user()->fullname ?? __('System'), - 'element_name' => $taskName, - 'case_title' => $caseTitle, // Populate this if needed - 'due_date' => $token->due_at ?? '', - 'link_review_task' => config('app.url') . '/' . 'tasks/' . $token->id . '/edit', - 'imgHeader' => config('app.url') . '/img/processmaker_login.png', - ]; - // Get the screen by key - $screen = Screen::getScreenByKey('default-email-task-notification'); - // Prepare the email configuration - $configEmail = [ - 'emailServer' => 0, // Use the default email server - 'subject' => "{$user->firstname} assigned you in '{$taskName}'", - 'screenEmailRef' => $screen->id ?? 0, // Define here the screen to use - ]; - - return [ - 'emailData' => $emailData, - 'configEmail' => $configEmail, - ]; - } - /** * Get due Variable * diff --git a/tests/Feature/TaskControllerTest.php b/tests/Feature/TaskControllerTest.php index 8924442338..262d17ae3c 100644 --- a/tests/Feature/TaskControllerTest.php +++ b/tests/Feature/TaskControllerTest.php @@ -146,33 +146,4 @@ public function testReturnMessageTokenNoFound() $response->assertSee('Token not found'); $response->assertStatus(404); } - - /** - * Test email task notification - */ - public function testEmailTaskNotificationInFormTask() - { - $user = User::factory()->create([ - 'email_task_notification' => 1, - ]); - Auth::login($user); - $process = Process::factory()->create([ - 'bpmn' => file_get_contents(__DIR__ . '/../Fixtures/email_task_notification_process.bpmn'), - ]); - // Start a request - $route = route('api.process_events.trigger', [$process->id, 'event' => 'node_1']); - $data = []; - $response = $this->apiCall('POST', $route, $data); - $response->assertStatus(201); - // Find the request - $instance = ProcessRequest::first(); - $task = ProcessRequestToken::where('element_type', 'task')->where('process_id', $process->id)->where('status', 'ACTIVE')->first(); - $this->assertEquals(0, $task->is_emailsent); - $user = User::where('id', $task->user_id)->first(); - $user->email_task_notification = 1; - $user->save(); - WorkflowManager::completeTask($process, $instance, $task, []); - $task = ProcessRequestToken::where('element_type', 'task')->where('process_id', $process->id)->where('status', 'ACTIVE')->first(); - $this->assertEquals(0, $task->is_emailsent); - } } From e834360e0a9c0a5abc519106946f24308454ad22 Mon Sep 17 00:00:00 2001 From: Fabio Date: Mon, 14 Jul 2025 16:02:45 -0400 Subject: [PATCH 14/22] FOUR-25241:Update email screen UI --- .../default-email-task-notification.json | 1024 ++++++++++------- 1 file changed, 607 insertions(+), 417 deletions(-) diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index fa99f63907..9887b22cf4 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -7,434 +7,624 @@ "title": "Default Email Task Notification", "description": "Screen for the email task notification", "type": "EMAIL", - "config": [ + "config":[ { - "name": "Default Email Task Notification", - "items": [ - { - "uuid": "c331f828-3b0f-47a3-bf6e-9037717a7690", - "label": "Rich Text", - "config": { - "icon": "fas fa-pencil-ruler", - "label": null, - "content": "

", - "interactive": true, - "renderVarHtml": false - }, - "component": "FormHtmlViewer", - "inspector": [ - { - "type": "FormTextArea", - "field": "content", - "config": { - "rows": 5, - "label": "Content", - "value": null, - "helper": "The HTML text to display" - } - }, - { - "type": "FormCheckbox", - "field": "renderVarHtml", - "config": { - "label": "Render HTML from a Variable", - "value": null, - "helper": null - } - }, - { - "type": "FormInput", - "field": "conditionalHide", - "config": { - "label": "Visibility Rule", - "helper": "This control is hidden until this expression is true" - } - }, - { - "type": "DeviceVisibility", - "field": "deviceVisibility", - "config": { - "label": "Device Visibility", - "helper": "This control is hidden until this expression is true" - } - }, - { - "type": "FormInput", - "field": "customFormatter", - "config": { - "label": "Custom Format String", - "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", - "validation": null - } - }, - { - "type": "FormInput", - "field": "customCssSelector", - "config": { - "label": "CSS Selector Name", - "helper": "Use this in your custom css rules", - "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type": "FormInput", - "field": "ariaLabel", - "config": { - "label": "Aria Label", - "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type": "FormInput", - "field": "tabindex", - "config": { - "label": "Tab Order", - "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", - "validation": "regex: [0-9]*" - } - }, - { - "type": "EncryptedConfig", - "field": "encryptedConfig", - "config": { - "label": "Encrypted", - "helper": null - } + "name":"Default Email Task Notification", + "items":[ + { + "uuid":"c331f828-3b0f-47a3-bf6e-9037717a7690", + "label":"Rich Text", + "config":{ + "icon":"fas fa-pencil-ruler", + "label":null, + "content":"

<\/p>", + "interactive":true, + "renderVarHtml":false + }, + "component":"FormHtmlViewer", + "inspector":[ + { + "type":"FormTextArea", + "field":"content", + "config":{ + "rows":5, + "label":"Content", + "value":null, + "helper":"The HTML text to display" + } + }, + { + "type":"FormCheckbox", + "field":"renderVarHtml", + "config":{ + "label":"Render HTML from a Variable", + "value":null, + "helper":null + } + }, + { + "type":"FormInput", + "field":"conditionalHide", + "config":{ + "label":"Visibility Rule", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"DeviceVisibility", + "field":"deviceVisibility", + "config":{ + "label":"Device Visibility", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"FormInput", + "field":"customFormatter", + "config":{ + "label":"Custom Format String", + "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", + "validation":null } - ], - "editor-control": "FormHtmlEditor", - "editor-component": "FormHtmlEditor" + }, + { + "type":"FormInput", + "field":"customCssSelector", + "config":{ + "label":"CSS Selector Name", + "helper":"Use this in your custom css rules", + "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type":"FormInput", + "field":"ariaLabel", + "config":{ + "label":"Aria Label", + "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type":"FormInput", + "field":"tabindex", + "config":{ + "label":"Tab Order", + "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", + "validation":"regex: [0-9]*" + } + }, + { + "type":"EncryptedConfig", + "field":"encryptedConfig", + "config":{ + "label":"Encrypted", + "helper":null + } + } + ], + "editor-control":"FormHtmlEditor", + "editor-component":"FormHtmlEditor" + }, + { + "uuid":"64801c0f-3b96-4261-a1ab-76f521a537ba", + "label":"Rich Text", + "config":{ + "icon":"fas fa-pencil-ruler", + "label":null, + "content":"

You just been assigned a task: {{element_name}}<\/strong><\/p>", + "interactive":true, + "renderVarHtml":false }, - { - "uuid": "64801c0f-3b96-4261-a1ab-76f521a537ba", - "label": "Rich Text", - "config": { - "icon": "fas fa-pencil-ruler", - "label": null, - "content": "

Hello {{ _firstname }} You just been assigned in a task by {{assigned_by}}.

", - "interactive": true, - "renderVarHtml": false - }, - "component": "FormHtmlViewer", - "inspector": [ - { - "type": "FormTextArea", - "field": "content", - "config": { - "rows": 5, - "label": "Content", - "value": null, - "helper": "The HTML text to display" - } - }, - { - "type": "FormCheckbox", - "field": "renderVarHtml", - "config": { - "label": "Render HTML from a Variable", - "value": null, - "helper": null - } - }, - { - "type": "FormInput", - "field": "conditionalHide", - "config": { - "label": "Visibility Rule", - "helper": "This control is hidden until this expression is true" - } - }, - { - "type": "DeviceVisibility", - "field": "deviceVisibility", - "config": { - "label": "Device Visibility", - "helper": "This control is hidden until this expression is true" - } - }, - { - "type": "FormInput", - "field": "customFormatter", - "config": { - "label": "Custom Format String", - "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", - "validation": null - } - }, - { - "type": "FormInput", - "field": "customCssSelector", - "config": { - "label": "CSS Selector Name", - "helper": "Use this in your custom css rules", - "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type": "FormInput", - "field": "ariaLabel", - "config": { - "label": "Aria Label", - "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type": "FormInput", - "field": "tabindex", - "config": { - "label": "Tab Order", - "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", - "validation": "regex: [0-9]*" - } - }, - { - "type": "EncryptedConfig", - "field": "encryptedConfig", - "config": { - "label": "Encrypted", - "helper": null - } + "component":"FormHtmlViewer", + "inspector":[ + { + "type":"FormTextArea", + "field":"content", + "config":{ + "rows":5, + "label":"Content", + "value":null, + "helper":"The HTML text to display" } - ], - "editor-control": "FormHtmlEditor", - "editor-component": "FormHtmlEditor" + }, + { + "type":"FormCheckbox", + "field":"renderVarHtml", + "config":{ + "label":"Render HTML from a Variable", + "value":null, + "helper":null + } + }, + { + "type":"FormInput", + "field":"conditionalHide", + "config":{ + "label":"Visibility Rule", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"DeviceVisibility", + "field":"deviceVisibility", + "config":{ + "label":"Device Visibility", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"FormInput", + "field":"customFormatter", + "config":{ + "label":"Custom Format String", + "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", + "validation":null + } + }, + { + "type":"FormInput", + "field":"customCssSelector", + "config":{ + "label":"CSS Selector Name", + "helper":"Use this in your custom css rules", + "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type":"FormInput", + "field":"ariaLabel", + "config":{ + "label":"Aria Label", + "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type":"FormInput", + "field":"tabindex", + "config":{ + "label":"Tab Order", + "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", + "validation":"regex: [0-9]*" + } + }, + { + "type":"EncryptedConfig", + "field":"encryptedConfig", + "config":{ + "label":"Encrypted", + "helper":null + } + } + ], + "editor-control":"FormHtmlEditor", + "editor-component":"FormHtmlEditor" + }, + { + "uuid":"1329abf7-3427-49cf-98f8-31f64fcbdd1b", + "label":"Link URL", + "config":{ + "icon":"fas fa-link", + "event":"link", + "label":"View in Processmaker", + "linkUrl":"{{link_review_task}}", + "variant":"primary", + "variantStyle":"button" }, - { - "uuid": "1329abf7-3427-49cf-98f8-31f64fcbdd1b", - "label": "Link URL", - "config": { - "icon": "fas fa-link", - "event": "link", - "label": "REVIEW TASK", - "linkUrl": "{{link_review_task}}", - "variant": "primary" - }, - "component": "LinkButton", - "inspector": [ - { - "type": "FormInput", - "field": "label", - "config": { - "label": "Label", - "helper": "The label describes the button's text" - } - }, - { - "type": "FormInput", - "field": "linkUrl", - "config": { - "label": "Link URL", - "helper": "Type here the URL link. Mustache syntax is supported." - } - }, - { - "type": "FormMultiselect", - "field": "variant", - "config": { - "label": "Button Variant Style", - "helper": "The variant determines the appearance of the button", - "options": [ - { - "value": "primary", - "content": "Primary" - }, - { - "value": "secondary", - "content": "Secondary" - }, - { - "value": "success", - "content": "Success" - }, - { - "value": "danger", - "content": "Danger" - }, - { - "value": "warning", - "content": "Warning" - }, - { - "value": "info", - "content": "Info" - }, - { - "value": "light", - "content": "Light" - }, - { - "value": "dark", - "content": "Dark" - }, - { - "value": "link", - "content": "Link" - } - ] - } - }, - { - "type": "FormInput", - "field": "conditionalHide", - "config": { - "label": "Visibility Rule", - "helper": "This control is hidden until this expression is true" - } - }, - { - "type": "DeviceVisibility", - "field": "deviceVisibility", - "config": { - "label": "Device Visibility", - "helper": "This control is hidden until this expression is true" - } - }, - { - "type": "FormInput", - "field": "customFormatter", - "config": { - "label": "Custom Format String", - "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", - "validation": null - } - }, - { - "type": "FormInput", - "field": "customCssSelector", - "config": { - "label": "CSS Selector Name", - "helper": "Use this in your custom css rules", - "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type": "FormInput", - "field": "ariaLabel", - "config": { - "label": "Aria Label", - "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type": "FormInput", - "field": "tabindex", - "config": { - "label": "Tab Order", - "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", - "validation": "regex: [0-9]*" - } - }, - { - "type": "EncryptedConfig", - "field": "encryptedConfig", - "config": { - "label": "Encrypted", - "helper": null - } + "component":"LinkButton", + "inspector":[ + { + "type":"FormInput", + "field":"label", + "config":{ + "label":"Label", + "helper":"The label describes the button's text" + } + }, + { + "type":"FormInput", + "field":"linkUrl", + "config":{ + "label":"Link URL", + "helper":"Type here the URL link. Mustache syntax is supported." + } + }, + { + "type":"FormMultiselect", + "field":"variant", + "config":{ + "label":"Button Variant Style", + "helper":"The variant determines the appearance of the button", + "options":[ + { + "value":"primary", + "content":"Primary" + }, + { + "value":"secondary", + "content":"Secondary" + }, + { + "value":"success", + "content":"Success" + }, + { + "value":"danger", + "content":"Danger" + }, + { + "value":"warning", + "content":"Warning" + }, + { + "value":"info", + "content":"Info" + }, + { + "value":"light", + "content":"Light" + }, + { + "value":"dark", + "content":"Dark" + }, + { + "value":"link", + "content":"Link" + } + ] + } + }, + { + "type":"FormInput", + "field":"conditionalHide", + "config":{ + "label":"Visibility Rule", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"DeviceVisibility", + "field":"deviceVisibility", + "config":{ + "label":"Device Visibility", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"FormInput", + "field":"customFormatter", + "config":{ + "label":"Custom Format String", + "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", + "validation":null + } + }, + { + "type":"FormInput", + "field":"customCssSelector", + "config":{ + "label":"CSS Selector Name", + "helper":"Use this in your custom css rules", + "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type":"FormInput", + "field":"ariaLabel", + "config":{ + "label":"Aria Label", + "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type":"FormInput", + "field":"tabindex", + "config":{ + "label":"Tab Order", + "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", + "validation":"regex: [0-9]*" + } + }, + { + "type":"EncryptedConfig", + "field":"encryptedConfig", + "config":{ + "label":"Encrypted", + "helper":null } - ], - "editor-control": "LinkButton", - "editor-component": "LinkButton" + } + ], + "editor-control":"LinkButton", + "editor-component":"LinkButton" + }, + { + "uuid":"68ec3d88-f1be-4e30-a5d1-4ff914d58dd0", + "label":"Rich Text", + "config":{ + "icon":"fas fa-pencil-ruler", + "label":null, + "content":"

Review Task Details<\/p>", + "interactive":true, + "renderVarHtml":false }, - { - "uuid": "1c520abd-b1ef-4d42-9b69-887c70bb94b6", - "label": "Rich Text", - "config": { - "icon": "fas fa-pencil-ruler", - "label": null, - "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TaskCaseDue DateAssigned By
{{element_name}}{{case_title}}{{due_date}}{{assigned_by}}
", - "interactive": true, - "renderVarHtml": false - }, - "component": "FormHtmlViewer", - "inspector": [ - { - "type": "FormTextArea", - "field": "content", - "config": { - "rows": 5, - "label": "Content", - "value": null, - "helper": "The HTML text to display" - } - }, - { - "type": "FormCheckbox", - "field": "renderVarHtml", - "config": { - "label": "Render HTML from a Variable", - "value": null, - "helper": null - } - }, - { - "type": "FormInput", - "field": "conditionalHide", - "config": { - "label": "Visibility Rule", - "helper": "This control is hidden until this expression is true" - } - }, - { - "type": "DeviceVisibility", - "field": "deviceVisibility", - "config": { - "label": "Device Visibility", - "helper": "This control is hidden until this expression is true" - } - }, - { - "type": "FormInput", - "field": "customFormatter", - "config": { - "label": "Custom Format String", - "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", - "validation": null - } - }, - { - "type": "FormInput", - "field": "customCssSelector", - "config": { - "label": "CSS Selector Name", - "helper": "Use this in your custom css rules", - "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type": "FormInput", - "field": "ariaLabel", - "config": { - "label": "Aria Label", - "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type": "FormInput", - "field": "tabindex", - "config": { - "label": "Tab Order", - "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", - "validation": "regex: [0-9]*" - } - }, - { - "type": "EncryptedConfig", - "field": "encryptedConfig", - "config": { - "label": "Encrypted", - "helper": null - } + "component":"FormHtmlViewer", + "inspector":[ + { + "type":"FormTextArea", + "field":"content", + "config":{ + "rows":5, + "label":"Content", + "value":null, + "helper":"The HTML text to display" + } + }, + { + "type":"FormCheckbox", + "field":"renderVarHtml", + "config":{ + "label":"Render HTML from a Variable", + "value":null, + "helper":null + } + }, + { + "type":"FormInput", + "field":"conditionalHide", + "config":{ + "label":"Visibility Rule", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"DeviceVisibility", + "field":"deviceVisibility", + "config":{ + "label":"Device Visibility", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"FormInput", + "field":"customFormatter", + "config":{ + "label":"Custom Format String", + "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", + "validation":null + } + }, + { + "type":"FormInput", + "field":"customCssSelector", + "config":{ + "label":"CSS Selector Name", + "helper":"Use this in your custom css rules", + "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type":"FormInput", + "field":"ariaLabel", + "config":{ + "label":"Aria Label", + "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type":"FormInput", + "field":"tabindex", + "config":{ + "label":"Tab Order", + "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", + "validation":"regex: [0-9]*" + } + }, + { + "type":"EncryptedConfig", + "field":"encryptedConfig", + "config":{ + "label":"Encrypted", + "helper":null + } + } + ], + "editor-control":"FormHtmlEditor", + "editor-component":"FormHtmlEditor" + }, + { + "uuid":"1c520abd-b1ef-4d42-9b69-887c70bb94b6", + "label":"Rich Text", + "config":{ + "icon":"fas fa-pencil-ruler", + "label":null, + "content":"\n\n\n\n\n
Task<\/th>\nCase<\/th>\nDue Date<\/th>\nAssigned By<\/th>\n<\/tr>\n<\/thead>\n
{{element_name}}<\/td>\n{{case_title}}<\/td>\n{{due_date}}<\/td>\n{{assigned_by}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>", + "interactive":true, + "renderVarHtml":false + }, + "component":"FormHtmlViewer", + "inspector":[ + { + "type":"FormTextArea", + "field":"content", + "config":{ + "rows":5, + "label":"Content", + "value":null, + "helper":"The HTML text to display" + } + }, + { + "type":"FormCheckbox", + "field":"renderVarHtml", + "config":{ + "label":"Render HTML from a Variable", + "value":null, + "helper":null + } + }, + { + "type":"FormInput", + "field":"conditionalHide", + "config":{ + "label":"Visibility Rule", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"DeviceVisibility", + "field":"deviceVisibility", + "config":{ + "label":"Device Visibility", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"FormInput", + "field":"customFormatter", + "config":{ + "label":"Custom Format String", + "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", + "validation":null + } + }, + { + "type":"FormInput", + "field":"customCssSelector", + "config":{ + "label":"CSS Selector Name", + "helper":"Use this in your custom css rules", + "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type":"FormInput", + "field":"ariaLabel", + "config":{ + "label":"Aria Label", + "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type":"FormInput", + "field":"tabindex", + "config":{ + "label":"Tab Order", + "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", + "validation":"regex: [0-9]*" + } + }, + { + "type":"EncryptedConfig", + "field":"encryptedConfig", + "config":{ + "label":"Encrypted", + "helper":null + } + } + ], + "editor-control":"FormHtmlEditor", + "editor-component":"FormHtmlEditor" + }, + { + "uuid":"f6e07dbd-d8c9-4860-9b0a-e284a0793b47", + "label":"Rich Text", + "config":{ + "icon":"fas fa-pencil-ruler", + "label":null, + "content":"

If you don’t want to receive this kind of emails, you can update your preferences or Unsubscribe from this type of email Read our Privacy Policy <\/a> and Terms of Use<\/a><\/p>", + "interactive":true, + "renderVarHtml":false + }, + "component":"FormHtmlViewer", + "inspector":[ + { + "type":"FormTextArea", + "field":"content", + "config":{ + "rows":5, + "label":"Content", + "value":null, + "helper":"The HTML text to display" + } + }, + { + "type":"FormCheckbox", + "field":"renderVarHtml", + "config":{ + "label":"Render HTML from a Variable", + "value":null, + "helper":null + } + }, + { + "type":"FormInput", + "field":"conditionalHide", + "config":{ + "label":"Visibility Rule", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"DeviceVisibility", + "field":"deviceVisibility", + "config":{ + "label":"Device Visibility", + "helper":"This control is hidden until this expression is true" + } + }, + { + "type":"FormInput", + "field":"customFormatter", + "config":{ + "label":"Custom Format String", + "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", + "validation":null + } + }, + { + "type":"FormInput", + "field":"customCssSelector", + "config":{ + "label":"CSS Selector Name", + "helper":"Use this in your custom css rules", + "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type":"FormInput", + "field":"ariaLabel", + "config":{ + "label":"Aria Label", + "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type":"FormInput", + "field":"tabindex", + "config":{ + "label":"Tab Order", + "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", + "validation":"regex: [0-9]*" + } + }, + { + "type":"EncryptedConfig", + "field":"encryptedConfig", + "config":{ + "label":"Encrypted", + "helper":null } - ], - "editor-control": "FormHtmlEditor", - "editor-component": "FormHtmlEditor" - } - ] + } + ], + "editor-control":"FormHtmlEditor", + "editor-component":"FormHtmlEditor" + } + ], + "order":1 } ], "computed": [], - "custom_css": "", + "custom_css":".link-button {\n max-width: max-content;\n margin-left: auto;\n margin-right: auto;\n}\n.email-wrapper {\n background-color: #F3F5F7;\n}", "status": "ACTIVE", "key": "default-email-task-notification", "watchers": [], From 2be18fc7c1b897d75957660cf4a709eb0298d86c Mon Sep 17 00:00:00 2001 From: Fabio Rodolfo Guachalla Blanco Date: Mon, 21 Jul 2025 16:24:34 -0400 Subject: [PATCH 15/22] Update default-email-task-notification.json --- .../default-email-task-notification.json | 96 +------------------ 1 file changed, 1 insertion(+), 95 deletions(-) diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index 9887b22cf4..ff9ae9d3aa 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -524,100 +524,6 @@ ], "editor-control":"FormHtmlEditor", "editor-component":"FormHtmlEditor" - }, - { - "uuid":"f6e07dbd-d8c9-4860-9b0a-e284a0793b47", - "label":"Rich Text", - "config":{ - "icon":"fas fa-pencil-ruler", - "label":null, - "content":"

If you don’t want to receive this kind of emails, you can update your preferences or Unsubscribe from this type of email Read our Privacy Policy <\/a> and Terms of Use<\/a><\/p>", - "interactive":true, - "renderVarHtml":false - }, - "component":"FormHtmlViewer", - "inspector":[ - { - "type":"FormTextArea", - "field":"content", - "config":{ - "rows":5, - "label":"Content", - "value":null, - "helper":"The HTML text to display" - } - }, - { - "type":"FormCheckbox", - "field":"renderVarHtml", - "config":{ - "label":"Render HTML from a Variable", - "value":null, - "helper":null - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormHtmlEditor", - "editor-component":"FormHtmlEditor" } ], "order":1 @@ -635,4 +541,4 @@ ], "screen_categories": [], "scripts": [] - } \ No newline at end of file + } From 2f0f31f36dafc251e650f4dc6da348554084d137 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Tue, 22 Jul 2025 19:12:14 -0400 Subject: [PATCH 16/22] FOUR-25427 --- .../Controllers/Process/ModelerController.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ProcessMaker/Http/Controllers/Process/ModelerController.php b/ProcessMaker/Http/Controllers/Process/ModelerController.php index 339f1e911e..cc8a592a37 100644 --- a/ProcessMaker/Http/Controllers/Process/ModelerController.php +++ b/ProcessMaker/Http/Controllers/Process/ModelerController.php @@ -12,6 +12,7 @@ use ProcessMaker\Models\ProcessCategory; use ProcessMaker\Models\ProcessLaunchpad; use ProcessMaker\Models\ProcessRequest; +use ProcessMaker\Models\Screen; use ProcessMaker\Models\ScreenCategory; use ProcessMaker\Models\ScreenType; use ProcessMaker\Models\ScriptCategory; @@ -20,7 +21,6 @@ use ProcessMaker\Package\Cdata\Http\Controllers\Api\CdataController; use ProcessMaker\Package\PackagePmBlocks\Http\Controllers\Api\PmBlockController; use ProcessMaker\PackageHelper; -use ProcessMaker\Models\Screen; use ProcessMaker\Traits\HasControllerAddons; use ProcessMaker\Traits\ProcessMapTrait; @@ -156,7 +156,7 @@ public function prepareModelerData( /** * Get the default email notification configuration for tasks - * + * * Returns an array containing the default email notification settings including: * - subject: The default email subject template * - type: The notification type (screen) @@ -166,16 +166,17 @@ public function prepareModelerData( */ private function getDefaultEmailNotification(): array { - $screen = Screen::getScreenByKey('default-email-task-notification'); - return [ - 'subject' => "RE: {{_user.fullName}} assigned you in {{taskName}}", - 'type' => "screen", + $screen = Screen::getScreenByKey('default-email-task-notification'); + + return [ + 'subject' => 'RE: {{_user.firstname}} assigned you in {{_task_name}}', + 'type' => 'screen', 'screenRef' => $screen->id, 'toRecipients' => [ [ - 'type' => "assignedUser", - 'value' => null - ] + 'type' => 'assignedUser', + 'value' => null, + ], ], ]; } From b77b71ab5c7909e90508a8e24aafc849772103b4 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Tue, 22 Jul 2025 19:23:04 -0400 Subject: [PATCH 17/22] FOUR-25427 --- .../processes/screens/default-email-task-notification.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index ff9ae9d3aa..21564dcb5b 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -17,7 +17,7 @@ "config":{ "icon":"fas fa-pencil-ruler", "label":null, - "content":"

<\/p>", + "content":"

<\/p>", "interactive":true, "renderVarHtml":false }, @@ -111,7 +111,7 @@ "config":{ "icon":"fas fa-pencil-ruler", "label":null, - "content":"

You just been assigned a task: {{element_name}}<\/strong><\/p>", + "content":"

You just been assigned a task: {{_task_name}}<\/strong><\/p>", "interactive":true, "renderVarHtml":false }, @@ -437,7 +437,7 @@ "config":{ "icon":"fas fa-pencil-ruler", "label":null, - "content":"\n\n\n\n\n
Task<\/th>\nCase<\/th>\nDue Date<\/th>\nAssigned By<\/th>\n<\/tr>\n<\/thead>\n
{{element_name}}<\/td>\n{{case_title}}<\/td>\n{{due_date}}<\/td>\n{{assigned_by}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>", + "content":"\n\n\n\n\n
Task<\/th>\nCase<\/th>\nDue Date<\/th>\nAssigned By<\/th>\n<\/tr>\n<\/thead>\n
{{_task_name}}<\/td>\n{{_case_title}}<\/td>\n{{_due_date}}<\/td>\n{{_assigned_by}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>", "interactive":true, "renderVarHtml":false }, From 07009762f6fc7d30179f9777f6d690e46b44af8a Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Tue, 22 Jul 2025 22:16:55 -0400 Subject: [PATCH 18/22] Updating some labels --- .../processes/screens/default-email-task-notification.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index 21564dcb5b..82cc6c6e32 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -111,7 +111,7 @@ "config":{ "icon":"fas fa-pencil-ruler", "label":null, - "content":"

You just been assigned a task: {{_task_name}}<\/strong><\/p>", + "content":"

You have been assigned a task: {{_task_name}}<\/strong><\/p>", "interactive":true, "renderVarHtml":false }, @@ -343,7 +343,7 @@ "config":{ "icon":"fas fa-pencil-ruler", "label":null, - "content":"

Review Task Details<\/p>", + "content":"

Review Task Details<\/p>", "interactive":true, "renderVarHtml":false }, @@ -437,7 +437,7 @@ "config":{ "icon":"fas fa-pencil-ruler", "label":null, - "content":"\n\n\n\n\n
Task<\/th>\nCase<\/th>\nDue Date<\/th>\nAssigned By<\/th>\n<\/tr>\n<\/thead>\n
{{_task_name}}<\/td>\n{{_case_title}}<\/td>\n{{_due_date}}<\/td>\n{{_assigned_by}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>", + "content":"\n\n\n\n\n
Task<\/th>\nCase<\/th>\nDue Date<\/th>\nAssigned By<\/th>\n<\/tr>\n<\/thead>\n
{{_task_name}}<\/td>\n{{_case_title}}<\/td>\n{{_due_date}}<\/td>\n{{_assigned_by}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>", "interactive":true, "renderVarHtml":false }, From 53d93482d07d3ade4be90964faf0c4eebe9ba3d6 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 23 Jul 2025 18:29:34 -0400 Subject: [PATCH 19/22] Updating the screen --- .../processes/screens/default-email-task-notification.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index 82cc6c6e32..568dd0d8cf 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -17,7 +17,7 @@ "config":{ "icon":"fas fa-pencil-ruler", "label":null, - "content":"

<\/p>", + "content":"

<\/p>", "interactive":true, "renderVarHtml":false }, @@ -437,7 +437,7 @@ "config":{ "icon":"fas fa-pencil-ruler", "label":null, - "content":"\n\n\n\n\n
Task<\/th>\nCase<\/th>\nDue Date<\/th>\nAssigned By<\/th>\n<\/tr>\n<\/thead>\n
{{_task_name}}<\/td>\n{{_case_title}}<\/td>\n{{_due_date}}<\/td>\n{{_assigned_by}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>", + "content":"\n\n\n\n\n
Task<\/th>\nCase<\/th>\nDue Date<\/th>\nAssigned By<\/th>\n<\/tr>\n<\/thead>\n
{{_task_name}}<\/td>\n{{_case_title}}<\/td>\n{{_due_date}}<\/td>\n{{_assigned_by}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>", "interactive":true, "renderVarHtml":false }, From f2fbf4748bc5e89f217b442e526c696ba031ddc2 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 23 Jul 2025 20:54:10 -0400 Subject: [PATCH 20/22] Adding doble quotes --- ProcessMaker/Http/Controllers/Process/ModelerController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProcessMaker/Http/Controllers/Process/ModelerController.php b/ProcessMaker/Http/Controllers/Process/ModelerController.php index cc8a592a37..6f665518ec 100644 --- a/ProcessMaker/Http/Controllers/Process/ModelerController.php +++ b/ProcessMaker/Http/Controllers/Process/ModelerController.php @@ -169,7 +169,7 @@ private function getDefaultEmailNotification(): array $screen = Screen::getScreenByKey('default-email-task-notification'); return [ - 'subject' => 'RE: {{_user.firstname}} assigned you in {{_task_name}}', + 'subject' => 'RE: {{_user.firstname}} assigned you in "{{_task_name}}"', 'type' => 'screen', 'screenRef' => $screen->id, 'toRecipients' => [ From e1048599700a4945fa05d78b8fb4c767364c5352 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Thu, 24 Jul 2025 13:56:40 -0400 Subject: [PATCH 21/22] Solving the cs in the json file --- .../default-email-task-notification.json | 1080 ++++++++--------- 1 file changed, 540 insertions(+), 540 deletions(-) diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index 568dd0d8cf..b1b9356063 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -1,544 +1,544 @@ { - "type": "screen_package", - "version": "2", - "screens": [ + "type": "screen_package", + "version": "2", + "screens": [ + { + "screen_category_id": null, + "title": "Default Email Task Notification", + "description": "Screen for the email task notification", + "type": "EMAIL", + "config": [ { - "screen_category_id": null, - "title": "Default Email Task Notification", - "description": "Screen for the email task notification", - "type": "EMAIL", - "config":[ - { - "name":"Default Email Task Notification", - "items":[ - { - "uuid":"c331f828-3b0f-47a3-bf6e-9037717a7690", - "label":"Rich Text", - "config":{ - "icon":"fas fa-pencil-ruler", - "label":null, - "content":"

<\/p>", - "interactive":true, - "renderVarHtml":false - }, - "component":"FormHtmlViewer", - "inspector":[ - { - "type":"FormTextArea", - "field":"content", - "config":{ - "rows":5, - "label":"Content", - "value":null, - "helper":"The HTML text to display" - } - }, - { - "type":"FormCheckbox", - "field":"renderVarHtml", - "config":{ - "label":"Render HTML from a Variable", - "value":null, - "helper":null - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormHtmlEditor", - "editor-component":"FormHtmlEditor" - }, - { - "uuid":"64801c0f-3b96-4261-a1ab-76f521a537ba", - "label":"Rich Text", - "config":{ - "icon":"fas fa-pencil-ruler", - "label":null, - "content":"

You have been assigned a task: {{_task_name}}<\/strong><\/p>", - "interactive":true, - "renderVarHtml":false - }, - "component":"FormHtmlViewer", - "inspector":[ - { - "type":"FormTextArea", - "field":"content", - "config":{ - "rows":5, - "label":"Content", - "value":null, - "helper":"The HTML text to display" - } - }, - { - "type":"FormCheckbox", - "field":"renderVarHtml", - "config":{ - "label":"Render HTML from a Variable", - "value":null, - "helper":null - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormHtmlEditor", - "editor-component":"FormHtmlEditor" - }, - { - "uuid":"1329abf7-3427-49cf-98f8-31f64fcbdd1b", - "label":"Link URL", - "config":{ - "icon":"fas fa-link", - "event":"link", - "label":"View in Processmaker", - "linkUrl":"{{link_review_task}}", - "variant":"primary", - "variantStyle":"button" - }, - "component":"LinkButton", - "inspector":[ - { - "type":"FormInput", - "field":"label", - "config":{ - "label":"Label", - "helper":"The label describes the button's text" - } - }, - { - "type":"FormInput", - "field":"linkUrl", - "config":{ - "label":"Link URL", - "helper":"Type here the URL link. Mustache syntax is supported." - } - }, - { - "type":"FormMultiselect", - "field":"variant", - "config":{ - "label":"Button Variant Style", - "helper":"The variant determines the appearance of the button", - "options":[ - { - "value":"primary", - "content":"Primary" - }, - { - "value":"secondary", - "content":"Secondary" - }, - { - "value":"success", - "content":"Success" - }, - { - "value":"danger", - "content":"Danger" - }, - { - "value":"warning", - "content":"Warning" - }, - { - "value":"info", - "content":"Info" - }, - { - "value":"light", - "content":"Light" - }, - { - "value":"dark", - "content":"Dark" - }, - { - "value":"link", - "content":"Link" - } - ] - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"LinkButton", - "editor-component":"LinkButton" - }, - { - "uuid":"68ec3d88-f1be-4e30-a5d1-4ff914d58dd0", - "label":"Rich Text", - "config":{ - "icon":"fas fa-pencil-ruler", - "label":null, - "content":"

Review Task Details<\/p>", - "interactive":true, - "renderVarHtml":false - }, - "component":"FormHtmlViewer", - "inspector":[ - { - "type":"FormTextArea", - "field":"content", - "config":{ - "rows":5, - "label":"Content", - "value":null, - "helper":"The HTML text to display" - } - }, - { - "type":"FormCheckbox", - "field":"renderVarHtml", - "config":{ - "label":"Render HTML from a Variable", - "value":null, - "helper":null - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormHtmlEditor", - "editor-component":"FormHtmlEditor" - }, - { - "uuid":"1c520abd-b1ef-4d42-9b69-887c70bb94b6", - "label":"Rich Text", - "config":{ - "icon":"fas fa-pencil-ruler", - "label":null, - "content":"\n\n\n\n\n
Task<\/th>\nCase<\/th>\nDue Date<\/th>\nAssigned By<\/th>\n<\/tr>\n<\/thead>\n
{{_task_name}}<\/td>\n{{_case_title}}<\/td>\n{{_due_date}}<\/td>\n{{_assigned_by}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>", - "interactive":true, - "renderVarHtml":false - }, - "component":"FormHtmlViewer", - "inspector":[ - { - "type":"FormTextArea", - "field":"content", - "config":{ - "rows":5, - "label":"Content", - "value":null, - "helper":"The HTML text to display" - } - }, - { - "type":"FormCheckbox", - "field":"renderVarHtml", - "config":{ - "label":"Render HTML from a Variable", - "value":null, - "helper":null - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormHtmlEditor", - "editor-component":"FormHtmlEditor" - } - ], - "order":1 + "name": "Default Email Task Notification", + "items": [ + { + "uuid": "c331f828-3b0f-47a3-bf6e-9037717a7690", + "label": "Rich Text", + "config": { + "icon": "fas fa-pencil-ruler", + "label": null, + "content": "

", + "interactive": true, + "renderVarHtml": false + }, + "component": "FormHtmlViewer", + "inspector": [ + { + "type": "FormTextArea", + "field": "content", + "config": { + "rows": 5, + "label": "Content", + "value": null, + "helper": "The HTML text to display" + } + }, + { + "type": "FormCheckbox", + "field": "renderVarHtml", + "config": { + "label": "Render HTML from a Variable", + "value": null, + "helper": null + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } + } + ], + "editor-control": "FormHtmlEditor", + "editor-component": "FormHtmlEditor" + }, + { + "uuid": "64801c0f-3b96-4261-a1ab-76f521a537ba", + "label": "Rich Text", + "config": { + "icon": "fas fa-pencil-ruler", + "label": null, + "content": "

You have been assigned a task: {{_task_name}}

", + "interactive": true, + "renderVarHtml": false + }, + "component": "FormHtmlViewer", + "inspector": [ + { + "type": "FormTextArea", + "field": "content", + "config": { + "rows": 5, + "label": "Content", + "value": null, + "helper": "The HTML text to display" + } + }, + { + "type": "FormCheckbox", + "field": "renderVarHtml", + "config": { + "label": "Render HTML from a Variable", + "value": null, + "helper": null + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } + } + ], + "editor-control": "FormHtmlEditor", + "editor-component": "FormHtmlEditor" + }, + { + "uuid": "1329abf7-3427-49cf-98f8-31f64fcbdd1b", + "label": "Link URL", + "config": { + "icon": "fas fa-link", + "event": "link", + "label": "View in Processmaker", + "linkUrl": "{{link_review_task}}", + "variant": "primary", + "variantStyle": "button" + }, + "component": "LinkButton", + "inspector": [ + { + "type": "FormInput", + "field": "label", + "config": { + "label": "Label", + "helper": "The label describes the button's text" + } + }, + { + "type": "FormInput", + "field": "linkUrl", + "config": { + "label": "Link URL", + "helper": "Type here the URL link. Mustache syntax is supported." + } + }, + { + "type": "FormMultiselect", + "field": "variant", + "config": { + "label": "Button Variant Style", + "helper": "The variant determines the appearance of the button", + "options": [ + { + "value": "primary", + "content": "Primary" + }, + { + "value": "secondary", + "content": "Secondary" + }, + { + "value": "success", + "content": "Success" + }, + { + "value": "danger", + "content": "Danger" + }, + { + "value": "warning", + "content": "Warning" + }, + { + "value": "info", + "content": "Info" + }, + { + "value": "light", + "content": "Light" + }, + { + "value": "dark", + "content": "Dark" + }, + { + "value": "link", + "content": "Link" + } + ] + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } + } + ], + "editor-control": "LinkButton", + "editor-component": "LinkButton" + }, + { + "uuid": "68ec3d88-f1be-4e30-a5d1-4ff914d58dd0", + "label": "Rich Text", + "config": { + "icon": "fas fa-pencil-ruler", + "label": null, + "content": "

Review Task Details

", + "interactive": true, + "renderVarHtml": false + }, + "component": "FormHtmlViewer", + "inspector": [ + { + "type": "FormTextArea", + "field": "content", + "config": { + "rows": 5, + "label": "Content", + "value": null, + "helper": "The HTML text to display" + } + }, + { + "type": "FormCheckbox", + "field": "renderVarHtml", + "config": { + "label": "Render HTML from a Variable", + "value": null, + "helper": null + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } + } + ], + "editor-control": "FormHtmlEditor", + "editor-component": "FormHtmlEditor" + }, + { + "uuid": "1c520abd-b1ef-4d42-9b69-887c70bb94b6", + "label": "Rich Text", + "config": { + "icon": "fas fa-pencil-ruler", + "label": null, + "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TaskCaseDue DateAssigned By
{{_task_name}}{{_case_title}}{{_due_date}}{{_assigned_by}}
", + "interactive": true, + "renderVarHtml": false + }, + "component": "FormHtmlViewer", + "inspector": [ + { + "type": "FormTextArea", + "field": "content", + "config": { + "rows": 5, + "label": "Content", + "value": null, + "helper": "The HTML text to display" + } + }, + { + "type": "FormCheckbox", + "field": "renderVarHtml", + "config": { + "label": "Render HTML from a Variable", + "value": null, + "helper": null + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } } - ], - "computed": [], - "custom_css":".link-button {\n max-width: max-content;\n margin-left: auto;\n margin-right: auto;\n}\n.email-wrapper {\n background-color: #F3F5F7;\n}", - "status": "ACTIVE", - "key": "default-email-task-notification", - "watchers": [], - "translations": null, - "is_template": 0, - "categories": null + ], + "editor-control": "FormHtmlEditor", + "editor-component": "FormHtmlEditor" + } + ], + "order": 1 } - ], - "screen_categories": [], - "scripts": [] - } + ], + "computed": [], + "custom_css": ".link-button {\n max-width: max-content;\n margin-left: auto;\n margin-right: auto;\n}\n.email-wrapper {\n background-color: #F3F5F7;\n}", + "status": "ACTIVE", + "key": "default-email-task-notification", + "watchers": [], + "translations": null, + "is_template": 0, + "categories": null + } + ], + "screen_categories": [], + "scripts": [] +} \ No newline at end of file From ae1a5e5cdf48008ba728696b40fc18be22a0d9ef Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Fri, 8 Aug 2025 18:53:39 -0400 Subject: [PATCH 22/22] FOUR-25652 --- .../screens/default-email-task-notification.json | 2 +- resources/img/arrow-top-right.png | Bin 0 -> 338 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 resources/img/arrow-top-right.png diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index b1b9356063..d6f3944b20 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -111,7 +111,7 @@ "config": { "icon": "fas fa-pencil-ruler", "label": null, - "content": "

You have been assigned a task: {{_task_name}}

", + "content": "

You have been assigned to a new task: {{_task_name}}
Please log in to your account to review and complete the task.

", "interactive": true, "renderVarHtml": false }, diff --git a/resources/img/arrow-top-right.png b/resources/img/arrow-top-right.png new file mode 100644 index 0000000000000000000000000000000000000000..4d1cdfa154f11225c7d1f15c1422bde93fd25702 GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`j)FbFd;%$g$s6l5$8 za(7}_cTVOdki(Mh=8XF{FZV?UeVtO$Gu-*S9cAER=r1c8vFq zgZTtr4PgoO0QHH!DJ*jq?0Zz3amvyAuy>qZOkDjJ|ENX1OEsLYMagbqTYAO8l4;Gh zO(suI@ut~3C%kOcn!>#&I^k#tkPrC-x59d&Jb{ktNzyq$j20zPi} zF8F}s@tTMEwl|$O&Sd!ft5l+gsdeT|P7P6wvpxPl1k<>?PS`WdS=afrTQ{-$fXodY zfepcYXI9R6S^hzALtmH|%cs*91KYgVcImdKI;Vst0GP&sfdBvi literal 0 HcmV?d00001