From: Hannes Bochmann Date: Thu, 13 Jun 2019 13:00:21 +0000 (+0200) Subject: [BUGFIX] Consider default recipients in preselection check X-Git-Tag: v10.0.0~74 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/71acb53612be96bee9156fbcbe23296b07d34276 [BUGFIX] Consider default recipients in preselection check When checking if a workspace stage has a preselection the default recipients need to be considered, too. Consequently the default recipients field in the TCA needs to stay visible if the option to show the notification dialog is unchecked. Resolves: #82475 Releases: master, 9.5, 8.7 Change-Id: I7edb257c803a519a06e8fc65fe2b5cb03d3ce7ff Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61056 Tested-by: TYPO3com Tested-by: Benni Mack Tested-by: Anja Leichsenring Reviewed-by: Benni Mack Reviewed-by: Frank Naegler Reviewed-by: Anja Leichsenring --- diff --git a/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php b/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php index 6b7cec4880a7..31a2e4f33b3b 100644 --- a/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php +++ b/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php @@ -265,6 +265,14 @@ class StageRecord extends AbstractRecord return ((int)$this->record['notification_preselection'] & 8) > 0; } + /** + * @return bool + */ + public function hasDefaultRecipients(): bool + { + return $this->record['notification_defaults'] !== ''; + } + /** * @return bool */ @@ -275,6 +283,7 @@ class StageRecord extends AbstractRecord || $this->areMembersPreselected() || $this->areEditorsPreselected() || $this->areResponsiblePersonsPreselected() + || $this->hasDefaultRecipients() ; } diff --git a/typo3/sysext/workspaces/Configuration/TCA/sys_workspace.php b/typo3/sysext/workspaces/Configuration/TCA/sys_workspace.php index eb17fc9cee41..04deb1c3c57c 100644 --- a/typo3/sysext/workspaces/Configuration/TCA/sys_workspace.php +++ b/typo3/sysext/workspaces/Configuration/TCA/sys_workspace.php @@ -165,7 +165,6 @@ return [ ], 'edit_notification_defaults' => [ 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults', - 'displayCond' => 'FIELD:edit_allow_notificaton_settings:BIT:1', 'config' => [ 'type' => 'group', 'internal_type' => 'db', @@ -203,7 +202,6 @@ return [ ], 'publish_notification_defaults' => [ 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults', - 'displayCond' => 'FIELD:publish_allow_notificaton_settings:BIT:1', 'config' => [ 'type' => 'group', 'internal_type' => 'db', @@ -241,7 +239,6 @@ return [ ], 'execute_notification_defaults' => [ 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults', - 'displayCond' => 'FIELD:execute_allow_notificaton_settings:BIT:1', 'config' => [ 'type' => 'group', 'internal_type' => 'db', diff --git a/typo3/sysext/workspaces/Configuration/TCA/sys_workspace_stage.php b/typo3/sysext/workspaces/Configuration/TCA/sys_workspace_stage.php index da6a53a684af..69417778cc38 100644 --- a/typo3/sysext/workspaces/Configuration/TCA/sys_workspace_stage.php +++ b/typo3/sysext/workspaces/Configuration/TCA/sys_workspace_stage.php @@ -58,7 +58,6 @@ return [ ], 'notification_defaults' => [ 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults', - 'displayCond' => 'FIELD:allow_notificaton_settings:BIT:1', 'config' => [ 'type' => 'group', 'internal_type' => 'db',