Merge branch 'bug_27991' into 'master'
Bug 27991 See merge request easycorp/zentaopms!6319
This commit is contained in:
@@ -728,6 +728,7 @@ class bugModel extends model
|
||||
->setIF($this->post->assignedTo == '' and $oldBug->status == 'closed', 'assignedTo', 'closed')
|
||||
->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active')
|
||||
->setIF($this->post->resolution != '', 'confirmed', 1)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolution != 'duplicate', 'duplicateBug', 0)
|
||||
->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->setIF(!$this->post->linkBug, 'linkBug', '')
|
||||
->setIF($this->post->case === '', 'case', 0)
|
||||
@@ -839,8 +840,9 @@ class bugModel extends model
|
||||
{
|
||||
$oldBug = $oldBugs[$bugID];
|
||||
|
||||
$os = array_filter($data->os[$bugID]);
|
||||
$browsers = array_filter($data->browsers[$bugID]);
|
||||
$os = array_filter($data->os[$bugID]);
|
||||
$browsers = array_filter($data->browsers[$bugID]);
|
||||
$duplicateBug = $data->duplicateBugs[$bugID] ? $data->duplicateBugs[$bugID] : $oldBug->duplicateBug;
|
||||
|
||||
$bug = new stdclass();
|
||||
$bug->id = $bugID;
|
||||
@@ -861,7 +863,7 @@ class bugModel extends model
|
||||
$bug->os = implode(',', $os);
|
||||
$bug->browser = implode(',', $browsers);
|
||||
$bug->resolution = $data->resolutions[$bugID];
|
||||
$bug->duplicateBug = $data->duplicateBugs[$bugID] ? $data->duplicateBugs[$bugID] : $oldBug->duplicateBug;
|
||||
$bug->duplicateBug = ($bug->resolution != '' and $bug->resolution != 'duplicate') ? 0 : $duplicateBug;
|
||||
|
||||
if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now;
|
||||
if($bug->resolution != '') $bug->confirmed = 1;
|
||||
|
||||
@@ -154,19 +154,18 @@ class groupModel extends model
|
||||
* Get group by account.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $visions
|
||||
* @param bool $allVision
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getByAccount($account, $visions = '')
|
||||
public function getByAccount($account, $allVision = false)
|
||||
{
|
||||
$visions = empty($visions) ? $this->config->vision : $visions;
|
||||
return $this->dao->select('t2.*')->from(TABLE_USERGROUP)->alias('t1')
|
||||
->leftJoin(TABLE_GROUP)->alias('t2')
|
||||
->on('t1.`group` = t2.id')
|
||||
->where('t1.account')->eq($account)
|
||||
->andWhere('t2.project')->eq(0)
|
||||
->andWhere('t2.vision')->in($visions)
|
||||
->beginIF(!$allVision)->andWhere('t2.vision')->eq($this->config->vision)->fi()
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.c-id {width: 50px;}
|
||||
.c-pri, .c-record, .c-left {width: 70px;}
|
||||
.c-reason {width: 100px;}
|
||||
.c-module, .c-assigned {width: 150px;}
|
||||
.c-module, .c-assigned, .c-name {width: 150px;}
|
||||
|
||||
@@ -635,10 +635,10 @@ class user extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
|
||||
}
|
||||
|
||||
$visionList = $this->user->getVisionList();
|
||||
$userVisionList = $this->user->getVisionList();
|
||||
|
||||
$user = $this->user->getById($userID, 'id');
|
||||
$userGroups = $this->loadModel('group')->getByAccount($user->account, implode(',', array_keys($visionList)));
|
||||
$userGroups = $this->loadModel('group')->getByAccount($user->account, count($userVisionList) > 1 ? true : false);
|
||||
|
||||
$title = $this->lang->company->common . $this->lang->colon . $this->lang->user->edit;
|
||||
$position[] = $this->lang->user->edit;
|
||||
@@ -650,7 +650,7 @@ class user extends control
|
||||
$this->view->companies = $this->loadModel('company')->getOutsideCompanies();
|
||||
$this->view->groups = $this->dao->select('id, name')->from(TABLE_GROUP)->where('project')->eq(0)->fetchPairs('id', 'name');
|
||||
$this->view->rand = $this->user->updateSessionRandom();
|
||||
$this->view->visionList = $visionList;
|
||||
$this->view->visionList = $userVisionList;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user