diff --git a/module/story/config/dtable.php b/module/story/config/dtable.php index 25b202d98a..6248dbe5b3 100644 --- a/module/story/config/dtable.php +++ b/module/story/config/dtable.php @@ -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; diff --git a/module/story/model.php b/module/story/model.php index 0c93b78d96..2b509e4627 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -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. */