Skip to content

Commit ea2b56b

Browse files
committed
FOUR-17008
1 parent ee3afee commit ea2b56b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎ProcessMaker/Models/Setting.php‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ function ($settings) use ($id) {
430430
public static function updateAllSettingsGroupId()
431431
{
432432
Setting::whereNull('group_id')->chunk(100, function ($settings) {
433+
$defaultId = SettingsMenus::EMAIL_MENU_GROUP;
433434
foreach ($settings as $setting) {
434435
// Define the value of 'menu_group' based on 'group'
435436
switch ($setting->group) {
@@ -466,7 +467,11 @@ public static function updateAllSettingsGroupId()
466467
$id = null;
467468
break;
468469
default: // The default value
469-
$id = SettingsMenus::getId(SettingsMenus::EMAIL_MENU_GROUP);
470+
if (preg_match('/^Email Server/', $setting->group)) {
471+
$id = SettingsMenus::getId(SettingsMenus::EMAIL_MENU_GROUP);
472+
} else {
473+
$id = SettingsMenus::getId($defaultId);
474+
}
470475
break;
471476
}
472477
if ($id !== null) {

0 commit comments

Comments
 (0)