diff --git a/module/execution/control.php b/module/execution/control.php index 43ae918936..7856b29095 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2009,13 +2009,7 @@ class execution extends control foreach($plans as $plan) $allPlans += $plan; } - $userList = array(); - $avatarPairs = $this->dao->select('account, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchPairs(); - foreach($avatarPairs as $account => $avatar) - { - if(!$avatar) continue; - $userList[$account]['avatar'] = $avatar; - } + $userList = $this->dao->select('account, realname name, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchAll('account'); $this->view->title = $this->lang->execution->kanban; $this->view->position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name); diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 68d322413e..c10a2d4628 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -11,7 +11,6 @@ function changeView(view) */ function renderUserAvatar(user, objectType, objectID, size) { - var title = user; var avatarSizeClass = 'avatar-' + (size || 'sm'); var $noPrivAndNoAssigned = $('
'); if(objectType == 'task') @@ -33,6 +32,7 @@ function renderUserAvatar(user, objectType, objectID, size) if(!user) return $(''); if(typeof user === 'string') user = {account: user}; + if(!user.avatar && window.userList && window.userList[user.account]) user = window.userList[user.account]; var $noPrivAvatar = $('
').avatar({user: user}); @@ -40,7 +40,7 @@ function renderUserAvatar(user, objectType, objectID, size) if(objectType == 'story' && !priv.canAssignStory) return $noPrivAvatar; if(objectType == 'bug' && !priv.canAssignBug) return $noPrivAvatar; - return $('').avatar({user: user}); + return $('').avatar({user: user}); } /**