Skip to content

Commit

Permalink
Merge pull request #7035 from ProcessMaker/bugfix/FOUR-17008
Browse files Browse the repository at this point in the history
FOUR-17008: [next] Define a value when the config is Email Server 1, 2
  • Loading branch information
ryancooley authored Jul 24, 2024
2 parents 6c5140f + ea2b56b commit 4b6728d
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 4b6728d

Please sign in to comment.