Skip to content

Commit

Permalink
FOUR-17008
Browse files Browse the repository at this point in the history
  • Loading branch information
pmPaulis committed Jul 4, 2024
1 parent 288fbc2 commit 60ef235
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ProcessMaker/Models/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ function ($settings) use ($id) {
public static function updateAllSettingsGroupId()
{
Setting::whereNull('group_id')->chunk(100, function ($settings) {
$defaultId = SettingsMenus::EMAIL_MENU_GROUP;
foreach ($settings as $setting) {
// Define the value of 'menu_group' based on 'group'
switch ($setting->group) {
Expand Down Expand Up @@ -466,7 +467,11 @@ public static function updateAllSettingsGroupId()
$id = null;
break;
default: // The default value
$id = SettingsMenus::getId(SettingsMenus::EMAIL_MENU_GROUP);
if (preg_match('/^Email Server/', $setting->group)) {
$id = SettingsMenus::getId(SettingsMenus::EMAIL_MENU_GROUP);
} else {
$id = SettingsMenus::getId($defaultId);
}
break;
}
if ($id !== null) {
Expand Down

0 comments on commit 60ef235

Please sign in to comment.