* Fix bug#41752.

This commit is contained in:
xieqiyu
2023-12-16 16:18:52 +08:00
parent 77938d264b
commit 4e1cc2beb5
2 changed files with 9 additions and 6 deletions
+1 -2
View File
@@ -97,8 +97,7 @@ $config->story->dtable->fieldList['estimate']['group'] = 5;
$config->story->dtable->fieldList['reviewer']['name'] = 'reviewer';
$config->story->dtable->fieldList['reviewer']['title'] = $lang->story->reviewer;
$config->story->dtable->fieldList['reviewer']['sortType'] = true;
$config->story->dtable->fieldList['reviewer']['type'] = 'user';
$config->story->dtable->fieldList['reviewer']['sortType'] = false;
$config->story->dtable->fieldList['reviewer']['show'] = true;
$config->story->dtable->fieldList['reviewer']['group'] = 5;
+8 -4
View File
@@ -4377,11 +4377,15 @@ class storyModel extends model
if($story->parent < 0) $story->parent = 0;
if(empty($options['execution'])) $story->isParent = isset($story->children);
if($story->mailto)
/* Format user list. */
foreach(array('mailto', 'reviewer') as $fieldName)
{
$mailto = array_filter(explode(',', $story->mailto));
foreach($mailto as $i => $account) $mailto[$i] = zget(zget($options, 'users', array()), $account);
$story->mailto = implode(' ', $mailto);
if(!isset($story->{$fieldName})) continue;
$fieldValue = is_string($story->{$fieldName}) ? array_filter(explode(',', $story->{$fieldName})) : array_filter($story->{$fieldName});
foreach($fieldValue as $i => $account) $fieldValue[$i] = zget(zget($options, 'users', array()), $account);
$story->{$fieldName} = implode(' ', $fieldValue);
}
/* Rewrite actions by action menus in options. */