Skip to content

Commit

Permalink
Merge pull request #7036 from ProcessMaker/bugfix/FOUR-17008-develop
Browse files Browse the repository at this point in the history
FOUR-17008: [develop] Define a value when the config is Email Server 1, 2
  • Loading branch information
ryancooley authored Jul 24, 2024
2 parents 165e3be + 60ef235 commit 386ed16
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 386ed16

Please sign in to comment.