diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php
index 0297533e9d..b4acf85dd7 100644
--- a/module/project/view/execution.html.php
+++ b/module/project/view/execution.html.php
@@ -56,7 +56,7 @@
createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), " " . $lang->programplan->create, '', "class='btn btn-primary'");?>
model == 'agileplus'):?>
- createLink('execution', 'create', "projectID=$projectID"), " " . $lang->execution->create, '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?>
+ createLink('execution', 'create', "projectID=$projectID"), " " . $lang->execution->create, '', "class='btn btn-primary create-execution-btn' data-app='project' onclick='$(this).removeAttr(\"data-toggle\")'");?>
- createLink('execution', 'create', "projectID=$projectID"), " " . $lang->execution->create, '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?>
+ createLink('execution', 'create', "projectID=$projectID"), " " . $lang->execution->create, '', "class='btn btn-primary create-execution-btn' data-app='project' onclick='$(this).removeAttr(\"data-toggle\")'");?>
@@ -78,7 +78,7 @@
createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), " " . $lang->programplan->create, '', "class='btn btn-info'");?>
- createLink('execution', 'create', "projectID=$projectID"), " " . $lang->execution->create, '', "class='btn btn-info' data-app='execution'");?>
+ createLink('execution', 'create', "projectID=$projectID"), " " . $lang->execution->create, '', "class='btn btn-info' data-app='project'");?>
diff --git a/module/user/model.php b/module/user/model.php
index 4ceb2267f0..54d5174c98 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -631,8 +631,10 @@ class userModel extends model
}
}
- $oldGroups = $this->dao->select('`group`')->from(TABLE_USERGROUP)->where('account')->eq($this->post->account)->fetchPairs('group', 'group');
- $newGroups = zget($_POST, 'groups', array());
+ $userVisionList = $this->getVisionList();
+ $user = $this->getById($userID, 'id');
+ $oldGroups = array_keys($this->loadModel('group')->getByAccount($user->account, count($userVisionList) > 1 ? true : false));
+ $newGroups = zget($_POST, 'groups', array());
sort($oldGroups);
sort($newGroups);