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 <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
return ((int)$this->record['notification_preselection'] & 8) > 0;
}
return ((int)$this->record['notification_preselection'] & 8) > 0;
}
+ /**
+ * @return bool
+ */
+ public function hasDefaultRecipients(): bool
+ {
+ return $this->record['notification_defaults'] !== '';
+ }
+
|| $this->areMembersPreselected()
|| $this->areEditorsPreselected()
|| $this->areResponsiblePersonsPreselected()
|| $this->areMembersPreselected()
|| $this->areEditorsPreselected()
|| $this->areResponsiblePersonsPreselected()
+ || $this->hasDefaultRecipients()
],
'edit_notification_defaults' => [
'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults',
],
'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',
'config' => [
'type' => 'group',
'internal_type' => 'db',
],
'publish_notification_defaults' => [
'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults',
],
'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',
'config' => [
'type' => 'group',
'internal_type' => 'db',
],
'execute_notification_defaults' => [
'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults',
],
'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',
'config' => [
'type' => 'group',
'internal_type' => 'db',
],
'notification_defaults' => [
'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults',
],
'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',
'config' => [
'type' => 'group',
'internal_type' => 'db',