Merge branch 'master' into 'sprint200_leiyong_task_56384'

# Conflicts:
#   module/kanban/view/space.html.php
This commit is contained in:
王怡栋
2022-06-09 07:40:03 +00:00
40 changed files with 609 additions and 189 deletions
+2 -2
View File
@@ -62,8 +62,8 @@ class usersEntry extends entry
$password = $this->request('password', '') ? md5($this->request('password')) : '';
$visions = $this->request('visions', 'rnd');
if(is_array($visions)) $visions = implode(',', $visions);
$visions = $this->request('visions', array('rnd'));
if(!is_array($visions)) $visions = explode(',', $visions);
$this->setPost('password1', $password);
$this->setPost('password2', $password);
+16 -1
View File
@@ -5,6 +5,16 @@ public function __construct($appName = '')
if($this->app->getModuleName() == 'kanban') $this->lang->kanban->menu = new stdclass();
}
/**
* Get kanban group by execution id.
*
* @param int $executionID
* @param int $browseType
* @param int $groupBy
* @param string $searchValue
* @access public
* @return array
*/
public function getKanban4Group($executionID, $browseType, $groupBy, $searchValue = '')
{
/* Get card data. */
@@ -85,7 +95,7 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu
$columnData[$columnID]['actions'] = $column->actions;
$cardOrder = 1;
$objects = zget($cardGroup, $columnID, array());
$objects = zget($cardGroup, $column->columnType, array());
foreach($objects as $object)
{
if(empty($object)) continue;
@@ -104,10 +114,14 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu
if($browseType == 'task')
{
if($searchValue != '' and strpos($object->name, $searchValue) === false) continue;
$cardData['name'] = $object->name;
$cardData['status'] = $object->status;
$cardData['left'] = $object->left;
}
else
{
if($searchValue != '' and strpos($object->name, $searchValue) === false) continue;
$cardData['title'] = $object->title;
}
@@ -132,6 +146,7 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu
* @param int $kanbanID
* @param string $browseType all|task|bug|story
* @param string $orderBy
* @param string $searchValue
* @access public
* @return array
*/
@@ -37,17 +37,17 @@
</div>
<?php else:?>
<div class='kanban-cards'>
<?php
<?php
$kanbanview = 'kanban';
if($this->cookie->kanbanview) $kanbanview = $this->cookie->kanbanview;
if(!common::hasPriv('execution', $kanbanview))
{
foreach (explode('|', 'kanban|task|calendar|gantt|tree|grouptask') as $view)
foreach (explode('|', 'kanban|task|calendar|gantt|tree|grouptask') as $view)
{
if(common::hasPriv('execution', $view))
{
$kanbanview = $view;
$kanbanview = $view;
break;
}
}
@@ -93,24 +93,24 @@
</div>
<div class="kanban-footer">
<div class='kanban-members pull-left'>
<?php $teams = $memberGroup[$kanban->id];?>
<?php $teams = isset($memberGroup[$kanban->id]) ? $memberGroup[$kanban->id] : array();?>
<?php $count = 0;?>
<?php foreach($teams as $member):?>
<?php if($count > 2) break;?>
<?php $count ++;?>
<?php if($count > 2) break;?>
<?php $count ++;?>
<div title="<?php echo zget($users, $member->account);?>">
<?php echo html::smallAvatar(array('avatar' => zget($usersAvatar, $member->account), 'account' => $member->account, 'name' => isset($member->realname) ? $member->realname : '')); ?>
</div>
<?php endforeach;?>
<?php if(count($teams) > 4):?>
<?php echo '<span>… </span>';?>
<?php endif;?>
<?php echo '<span>… </span>';?>
<?php endif;?>
<?php if(count($teams) > 3):?>
<?php $lastMember = end($teams);?>
<div title="<?php echo $lastMember->realname;?>">
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$lastMember->account], 'account' => $lastMember->account, 'name' => $lastMember->realname), 'avatar-circle avatar-' . key($lastMember)); ?>
</div>
<?php endif;?>
<div title="<?php echo $lastMember->realname;?>">
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$lastMember->account], 'account' => $lastMember->account, 'name' => $lastMember->realname), 'avatar-circle avatar-' . key($lastMember)); ?>
</div>
<?php endif;?>
</div>
<div class='kanban-members-count pull-left'><?php echo sprintf($lang->project->teamSumCount, count($teams));?></div>
<div class='kanban-acl pull-right'>
@@ -153,7 +153,6 @@
common::printIcon('story', 'assignTo', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
if($this->config->edition == 'max' and $this->app->tab == 'project' and common::hasPriv('story', 'importToLib')) echo html::a('#importToLib', "<i class='icon icon-assets'></i> " . $this->lang->story->importToLib, '', 'class="btn" data-toggle="modal"');
if($from == 'execution' and strpos('draft,closed', $story->status) === false) common::printIcon('task', 'create', "execution=$param&storyID=$story->id&moduleID=$story->module", $story, 'button', 'plus', '', 'showinonlybody');
+1 -1
View File
@@ -101,7 +101,7 @@
<td colspan='3'>
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=story"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
<div class='input-group <?php if(empty($stories)) echo "hidden";?>'>
<?php echo html::select('story', array($task->story => empty($stories) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
<?php echo html::select('story', $stories, $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
</div>
</td>
+7 -3
View File
@@ -521,7 +521,7 @@ class router extends baseRouter
if($moduleName == 'flow' and $methodName == 'browse')
{
$mode = 'browse';
if(count($params) > 0) $mode = array_shift($params);
if(count($params) > 0 and !is_numeric($params[0])) $mode = array_shift($params);
array_unshift($params, $mode);
}
@@ -546,9 +546,13 @@ class router extends baseRouter
if($moduleName == 'flow' and $methodName == 'browse')
{
$mode = 'browse';
if(count($params) > 0) $mode = array_pop($params);
$mode = zget($params, 'mode', 'browse');
if(is_numeric($mode)) $mode = 'browse';
$params['mode'] = $mode;
$get = array_reverse($_GET);
$get['mode'] = $mode;
$_GET = array_reverse($get);
}
$params[$this->config->methodVar] = $methodName; // $param = array('id' => 1, 'f' => 'operate');
$params[$this->config->moduleVar] = $moduleName; // $param = array('id' => 1, 'f' => 'operate', 'm' => 'flow');
+41 -32
View File
@@ -411,10 +411,11 @@ class bug extends control
$execution = $this->loadModel('execution')->getByID($executionID);
if($executionID == $output['executionID'] and $this->app->tab == 'execution' and $execution->type == 'kanban')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, 0)"));
}
else
@@ -709,10 +710,12 @@ class bug extends control
$execution = $this->loadModel('execution')->getByID($executionID);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
else
@@ -963,8 +966,9 @@ class bug extends control
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup);
$kanbanData = json_encode($kanbanData);
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -1288,8 +1292,9 @@ class bug extends control
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup);
$kanbanData = json_encode($kanbanData);
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -1495,11 +1500,12 @@ class bug extends control
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
@@ -1589,11 +1595,12 @@ class bug extends control
{
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
@@ -1690,11 +1697,12 @@ class bug extends control
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
@@ -1750,11 +1758,12 @@ class bug extends control
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
+1
View File
@@ -61,6 +61,7 @@ $lang->bug->openedDate = 'ReportedDate';
$lang->bug->openedDateAB = 'Reported';
$lang->bug->openedBuild = 'Open Build';
$lang->bug->assignedTo = 'AssignTo';
$lang->bug->assignedToMe = 'AssignToMe';
$lang->bug->assignBug = 'AssignedTo';
$lang->bug->assignedToAB = 'AssignedTo';
$lang->bug->assignedDate = 'AssignedDate';
+1
View File
@@ -61,6 +61,7 @@ $lang->bug->openedDate = '创建日期';
$lang->bug->openedDateAB = '创建日期';
$lang->bug->openedBuild = '影响版本';
$lang->bug->assignedTo = '指派给';
$lang->bug->assignedToMe = '指派给我';
$lang->bug->assignBug = '指派给';
$lang->bug->assignedToAB = '指派给';
$lang->bug->assignedDate = '指派日期';
+48 -4
View File
@@ -1601,18 +1601,62 @@ class bugModel extends model
* @param int $limit
* @param object $pager
* @param int $executionID
* @param int $queryID
* @access public
* @return void
* @return array
*/
public function getUserBugs($account, $type = 'assignedTo', $orderBy = 'id_desc', $limit = 0, $pager = null, $executionID = 0)
public function getUserBugs($account, $type = 'assignedTo', $orderBy = 'id_desc', $limit = 0, $pager = null, $executionID = 0, $queryID = 0)
{
if(!$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array();
$moduleName = $this->app->rawMethod == 'work' ? 'workBug' : 'contributeBug';
$queryName = $moduleName . 'Query';
$formName = $moduleName . 'Form';
$bugIDList = array();
if($moduleName == 'contributeBug')
{
$bugsAssignedByMe = $this->loadModel('my')->getAssignedByMe($account, 0, $pager, $orderBy, 0, 'bug');
foreach($bugsAssignedByMe as $bugID => $bug)
{
$bugIDList[$bugID] = $bugID;
}
}
if($queryID)
{
$query = $this->loadModel('search')->getQuery($queryID);
if($query)
{
$this->session->set($queryName, $query->sql);
$this->session->set($formName, $query->form);
}
else
{
$this->session->set($queryName, ' 1 = 1');
}
}
else
{
if($this->session->$queryName == false) $this->session->set($queryName, ' 1 = 1');
}
$query = $this->session->$queryName;
$query = preg_replace('/`(\w+)`/', 't1.`$1`', $query);
if($type != 'bySearch' and !$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array();
$bugs = $this->dao->select('t1.*,t2.name as productName')->from(TABLE_BUG)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->where('t1.deleted')->eq(0)
->beginIF($type == 'bySearch')->andWhere($query)->fi()
->beginIF($executionID)->andWhere('t1.execution')->eq($executionID)->fi()
->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($type != 'all')->andWhere("t1.`$type`")->eq($account)->fi()
->beginIF($type != 'all' and $type != 'bySearch')->andWhere("t1.`$type`")->eq($account)->fi()
->beginIF($type == 'bySearch' and $moduleName == 'workBug')->andWhere("t1.assignedTo")->eq($account)->fi()
->beginIF($type == 'bySearch' and $moduleName == 'contributeBug')
->andWhere('t1.openedBy', 1)->eq($account)
->orWhere('t1.closedBy')->eq($account)
->orWhere('t1.resolvedBy')->eq($account)
->orWhere('t1.id')->in($bugIDList)
->markRight(1)
->fi()
->orderBy($orderBy)
->beginIF($limit > 0)->limit($limit)->fi()
->page($pager)
+2
View File
@@ -51,6 +51,7 @@ $config->execution->search['fields']['desc'] = $lang->task->desc;
$config->execution->search['fields']['assignedTo'] = $lang->task->assignedTo;
$config->execution->search['fields']['pri'] = $lang->task->pri;
if($app->tab == 'my') $config->execution->search['fields']['project'] = $lang->task->project;
$config->execution->search['fields']['execution'] = $lang->task->execution;
$config->execution->search['fields']['module'] = $lang->task->module;
$config->execution->search['fields']['estimate'] = $lang->task->estimate;
@@ -86,6 +87,7 @@ $config->execution->search['params']['desc'] = array('operator' => 'in
$config->execution->search['params']['assignedTo'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->execution->search['params']['pri'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->task->priList);
if($app->tab == 'my') $config->execution->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => '');
$config->execution->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => '');
$config->execution->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => '');
$config->execution->search['params']['estimate'] = array('operator' => '=', 'control' => 'input', 'values' => '');
+14 -1
View File
@@ -115,6 +115,7 @@ class execution extends control
$this->loadModel('datatable');
$this->loadModel('setting');
$this->loadModel('product');
$this->loadModel('user');
if(common::hasPriv('execution', 'create')) $this->lang->TRActions = html::a($this->createLink('execution', 'create'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->execution->create, '', "class='btn btn-primary'");
@@ -211,6 +212,7 @@ class execution extends control
/* team member pairs. */
$memberPairs = array();
foreach($this->view->teamMembers as $key => $member) $memberPairs[$key] = $member->realname;
$memberPairs = $this->user->processAccountSort($memberPairs);
$showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
$extra = (isset($this->config->execution->task->allModule) && $this->config->execution->task->allModule == 1) ? 'allModule' : '';
@@ -227,7 +229,7 @@ class execution extends control
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->status = $status;
$this->view->users = $this->loadModel('user')->getPairs('noletter|all');
$this->view->users = $this->user->getPairs('noletter|all');
$this->view->param = $param;
$this->view->executionID = $executionID;
$this->view->execution = $execution;
@@ -458,6 +460,14 @@ class execution extends control
if(!empty($_POST))
{
$this->execution->importTask($toExecution);
/* If link from no head then reload. */
if(isonlybody())
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($toExecution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
return print(js::reload('parent'));
}
return print(js::locate(inlink('importTask', "toExecution=$toExecution&fromExecution=$fromExecution"), 'parent'));
}
@@ -918,6 +928,7 @@ class execution extends control
{
$memberPairs[$key] = $member->realname;
}
$memberPairs = $this->user->processAccountSort($memberPairs);
/* Build the search form. */
$actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&productID=$productID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
@@ -2121,6 +2132,7 @@ class execution extends control
$this->session->set('execLaneType', $browseType);
$this->session->set('execGroupBy', $groupBy);
$this->session->set('storyList', $this->app->getURI(true), 'execution');
$this->session->set('rdSearchValue', '');
$this->lang->execution->menu = new stdclass();
$execution = $this->commonAction($executionID);
@@ -3831,6 +3843,7 @@ class execution extends control
if($lastEditedTime > $enterTime or $groupBy != 'default' or !empty($searchValue))
{
if($from == 'RD') $this->session->set('rdSearchValue', $searchValue);
$kanbanGroup = $from == 'execution' ? $this->loadModel('kanban')->getExecutionKanban($executionID, $browseType, $groupBy) : $this->loadModel('kanban')->getRDKanban($executionID, $browseType, 'id_asc', 0, $groupBy, $searchValue);
return print(json_encode($kanbanGroup));
}
+18
View File
@@ -3,3 +3,21 @@ function reload(toProject, fromProject)
link = createLink('execution','importtask','toProject='+toProject + '&fromProject='+fromProject);
location.href = link;
}
$(function()
{
$(".preview").modalTrigger({width:1000, type:'iframe'});
if(isonlybody == true) parent.$('#triggerModal .modal-content .modal-header .close').hide();
});
/**
* Go back.
*
* @access public
* @return void
*/
function goback()
{
parent.location.reload();
}
+47 -16
View File
@@ -451,12 +451,37 @@ function renderDeadline(deadline, status)
now.setMilliseconds(0);
var isEarlyThanToday = date.getTime() < now.getTime();
var deadlineDate = $.zui.formatDate(date, 'MM-dd');
var statusList = ['wait','doing','pause'];
var statusList = ['doing','pause'];
var textColor = isEarlyThanToday && typeof(status) != 'undefined' && statusList.indexOf(status) != -1 ? 'text-red' : 'text-muted';
return $('<span class="info info-deadline"/>').text(deadlineLang + ' ' + deadlineDate).addClass(textColor);
}
/**
* Render estStarted
*
* @param {String|Date} estStarted EstStarted
* @param {string} status
* @access public
* @return void
*/
function renderEstStarted(estStarted, status)
{
if(estStarted == '0000-00-00') return;
var date = $.zui.createDate(estStarted);
var now = new Date();
now.setHours(0);
now.setMinutes(0);
now.setSeconds(0);
now.setMilliseconds(0);
var isEarlyThanToday = date.getTime() < now.getTime();
var estStartedDate = $.zui.formatDate(date, 'MM-dd');
var textColor = isEarlyThanToday && typeof(status) != 'undefined' && status == 'wait' ? 'text-red' : 'text-muted';
return $('<span class="info info-deadline"/>').text(estStartedLang + ' ' + estStartedDate).addClass(textColor);
}
/**
* Render story item
* @param {Object} item Story item object
@@ -606,8 +631,7 @@ function renderTaskItem(item, $item, col)
var $title = $item.find('.title');
if(!$title.length)
{
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-checked text-muted"></i> ' : '') + '<span class="text"></span></a>')
.attr('href', $.createLink('task', 'view', 'taskID=' + item.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '80%');
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-checked text-muted"></i> ' : '') + '<span class="text"></span></a>').attr('href', $.createLink('task', 'view', 'taskID=' + item.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '80%');
$title.appendTo($item);
}
var name = rdSearchValue != '' ? "<span class='text'>" + item.name.replaceAll(rdSearchValue, "<span class='text-danger'>" + rdSearchValue + "</span>") + "</span>": "<span class='text'>" + item.name + "</span>";
@@ -623,7 +647,8 @@ function renderTaskItem(item, $item, col)
var $infos = $item.find('.infos');
if(!$infos.length) $infos = $('<div class="infos"></div>');
$infos.html([priHtml, hoursHtml].join(''));
if(item.deadline && scaleSize <= 1) $infos.append(renderDeadline(item.deadline, item.status));
if(item.deadline && scaleSize <= 1 && (item.status == 'doing' || item.status == 'pause')) $infos.append(renderDeadline(item.deadline, item.status));
if(item.estStarted && scaleSize <= 1 && item.status == 'wait') $infos.append(renderEstStarted(item.estStarted, item.status));
$infos[scaleSize <= 1 ? 'append' : 'prepend'](avatarHtml);
if(scaleSize <= 1) $infos.appendTo($item);
@@ -740,7 +765,7 @@ function renderHeaderCol($column, column, $header, kanbanData)
var printMoreBtn = (columnPrivs.includes('setColumn') || columnPrivs.includes('setWIP'));
/* Render more menu. */
if(column.type == 'backlog' || column.type == 'wait' || column.type == 'unconfirmed' && $actions.children('.text-primary').length == 0)
if((column.type == 'backlog' || column.type == 'wait' || column.type == 'unconfirmed') && $actions.children('.text-primary').length == 0)
{
var tips = productID ? '' : 'onclick="tips()"';
$actions.append([
@@ -818,7 +843,6 @@ function updateRegion(regionID, regionData = [])
if(groupBy == 'default') $("div[data-id^=" + regionID + "].region").show();
if(groupBy != 'default') $("div[data-id^=" + regionID + "].kanban").show();
}
$region.empty();
$region.data('zui.kanban').render(data);
resetRegionHeight('open');
return true;
@@ -1528,21 +1552,23 @@ $(function()
/* Ajax update kanban. */
if(groupBy == 'default')
{
var lastUpdateData;
setInterval(function()
{
$.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=" + entertime + "&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue' + rdSearchValue), function(data)
if(rdSearchValue == '')
{
if(data && lastUpdateData !== data)
$.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=" + entertime + "&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue=' + rdSearchValue), function(data)
{
lastUpdateData = data;
kanbanData = $.parseJSON(data);
for(var region in kanbanData)
if(data && lastUpdateData !== data)
{
updateRegion(region, kanbanData[region]);
lastUpdateData = data;
kanbanData = $.parseJSON(data);
for(var region in kanbanData)
{
updateRegion(region, kanbanData[region]);
}
}
}
});
});
}
}, 10000);
}
@@ -1640,8 +1666,10 @@ function toggleRDSearchBox()
function searchCards(value)
{
rdSearchValue = value;
$.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue=' + value), function(data)
$.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue=' + rdSearchValue), function(data)
{
if(lastUpdateData === data) return;
lastUpdateData = data;
var kanbanData = $.parseJSON(data);
var hideAll = true;
$('#kanban').children('.region').children("div[id^='kanban']").each(function()
@@ -1649,6 +1677,9 @@ function searchCards(value)
var regionID = $(this).attr('data-id');
if(kanbanData != null) data = groupBy == 'default' ? kanbanData[regionID] : kanbanData[groupBy];
if(rdSearchValue != '' && data.laneCount != 0) $(this).parent().show();
if(rdSearchValue != '' && data.laneCount == 0) $(this).parent().hide();
hideAll = hideAll && !updateRegion(regionID, data);
});
+29 -4
View File
@@ -67,12 +67,37 @@ function renderDeadline(deadline, status)
now.setMilliseconds(0);
var isEarlyThanToday = date.getTime() < now.getTime();
var deadlineDate = $.zui.formatDate(date, 'MM-dd');
var statusList = ['wait','doing','pause'];
var statusList = ['doing','pause'];
var textColor = isEarlyThanToday && typeof(status) != 'undefined' && statusList.indexOf(status) != -1 ? 'text-red' : 'text-muted';
return $('<span class="info info-deadline"/>').text(deadlineLang + ' ' + deadlineDate).addClass(textColor);
}
/**
* Render estStarted
*
* @param {String|Date} estStarted EstStarted
* @param {string} status
* @access public
* @return void
*/
function renderEstStarted(estStarted, status)
{
if(estStarted == '0000-00-00') return;
var date = $.zui.createDate(estStarted);
var now = new Date();
now.setHours(0);
now.setMinutes(0);
now.setSeconds(0);
now.setMilliseconds(0);
var isEarlyThanToday = date.getTime() < now.getTime();
var estStartedDate = $.zui.formatDate(date, 'MM-dd');
var textColor = isEarlyThanToday && typeof(status) != 'undefined' && status == 'wait' ? 'text-red' : 'text-muted';
return $('<span class="info info-deadline"/>').text(estStartedLang + ' ' + estStartedDate).addClass(textColor);
}
/**
* Render story item
* @param {Object} item Story item object
@@ -218,8 +243,7 @@ function renderTaskItem(item, $item, col)
var $title = $item.find('.title');
if(!$title.length)
{
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-checked text-muted"></i> ' : '') + '<span class="text"></span></a>')
.attr('href', $.createLink('task', 'view', 'taskID=' + item.id, '', true));
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-checked text-muted"></i> ' : '') + '<span class="text"></span></a>').attr('href', $.createLink('task', 'view', 'taskID=' + item.id, '', true));
$title.appendTo($item);
}
$title.attr('title', item.name).find('.text').text(item.name);
@@ -234,7 +258,8 @@ function renderTaskItem(item, $item, col)
var $infos = $item.find('.infos');
if(!$infos.length) $infos = $('<div class="infos"></div>');
$infos.html([priHtml, hoursHtml].join(''));
if(item.deadline && scaleSize <= 1) $infos.append(renderDeadline(item.deadline, item.status));
if(item.deadline && scaleSize <= 1 && (item.status == 'doing' || item.status == 'pause')) $infos.append(renderDeadline(item.deadline, item.status));
if(item.estStarted && scaleSize <= 1 && item.status == 'wait') $infos.append(renderEstStarted(item.estStarted, item.status));
$infos[scaleSize <= 1 ? 'append' : 'prepend'](avatarHtml);
if(scaleSize <= 1) $infos.appendTo($item);
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('isonlybody', isonlybody());?>
<div id='mainMenu' class='clearfix'>
<div class='pull-left btn-toolbar'>
<?php echo html::a($this->createLink('execution', 'importTask', "execution=$executionID"), "<span class='text'>{$lang->execution->importTask}</span>", '', "class='btn btn-link btn-active-text'");?>
@@ -83,6 +84,13 @@
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar show-always"><?php echo html::submitButton('<i class="icon icon-import icon-sm"></i> ' . $lang->execution->importTask, '', 'btn btn-secondary btn-wide');?></div>
<div class='btn-toolbar'>
<?php if(isonlybody()):?>
<?php echo html::commonButton('<i class="icon icon-sm"></i> ' . $lang->goback, 'onclick="goback()"', 'btn');?>
<?php else:?>
<?php echo html::backButton('','','btn');?>
<?php endif;?>
</div>
</div>
<?php endif;?>
</form>
+5 -1
View File
@@ -34,6 +34,7 @@ js::set('executionLang', $lang->execution);
js::set('bugLang', $lang->bug);
js::set('taskLang', $lang->task);
js::set('deadlineLang', $lang->task->deadlineAB);
js::set('estStartedLang', $lang->task->estStarted);
js::set('kanbancolumnLang', $lang->kanbancolumn);
js::set('kanbancardLang', $lang->kanbancard);
js::set('executionID', $execution->id);
@@ -53,6 +54,7 @@ js::set('productCount', count($productNames));
js::set('executionID', $execution->id);
js::set('reviewStoryParis', $reviewStoryParis);
js::set('needLinkProducts', $lang->execution->needLinkProducts);
js::set('lastUpdateData', '');
js::set('rdSearchValue', '');
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
@@ -64,6 +66,7 @@ $canBatchCreateTask = common::hasPriv('task', 'batchCreate');
$canCreateBug = ($productID and common::hasPriv('bug', 'create'));
$canBatchCreateBug = ($productID and common::hasPriv('bug', 'batchCreate'));
$canImportBug = ($productID and common::hasPriv('execution', 'importBug'));
$canImportTask = ($productID and common::hasPriv('execution', 'importTask'));
$canCreateStory = ($productID and common::hasPriv('story', 'create'));
$canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate'));
$canLinkStory = ($productID and common::hasPriv('execution', 'linkStory'));
@@ -203,7 +206,8 @@ js::set('priv',
}?>
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
<?php if($canCreateTask) echo '<li>' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe' data-width=80%") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe' data-width=90%") . '</li>';?>
<?php if($canImportTask) echo '<li>' . html::a(helper::createLink('execution', 'importTask', "toExecution=$execution->id", '', true), $lang->execution->importTask, '', "class='iframe' data-width=90%") . '</li>';?>
<?php if($canBatchCreateTask) echo '<li>' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '</li>';?>
</ul>
</div>
@@ -207,6 +207,7 @@ js::set('priv',
<?php js::set('sortColumn', $lang->execution->sortColumn);?>
<?php js::set('kanbanLang', $lang->kanban);?>
<?php js::set('deadlineLang', $lang->task->deadlineAB);?>
<?php js::set('estStartedLang', $lang->task->estStarted);?>
<?php js::set('noAssigned', $lang->task->noAssigned);?>
<?php js::set('userList', $userList);?>
<?php js::set('entertime', time());?>
+3 -2
View File
@@ -1609,7 +1609,7 @@ class kanban extends control
$this->view->canEdit = $from == 'RDKanban' ? 0 : 1;
$this->view->column = $column;
$this->view->title = $column->name . $this->lang->colon . $this->lang->kanban->setColumn;
$this->view->title = $column->name . $this->lang->colon . $this->lang->kanban->editColumn;
$this->display();
}
@@ -1767,7 +1767,8 @@ class kanban extends control
$this->dao->update(TABLE_STORYSTAGE)->set('stage')->eq($toColumn->type)->where('story')->eq($cardID)->exec();
}
$kanbanGroup = $regionID == 0 ? $this->kanban->getExecutionKanban($executionID, $browseType, $groupBy) : $this->kanban->getRDKanban($executionID, $browseType, $orderBy, $regionID, $groupBy);
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanGroup = $regionID == 0 ? $this->kanban->getExecutionKanban($executionID, $browseType, $groupBy) : $this->kanban->getRDKanban($executionID, $browseType, $orderBy, $regionID, $groupBy, $rdSearchValue);
echo json_encode($kanbanGroup);
}
+1 -1
View File
@@ -7,7 +7,7 @@
#spaceList .spaceActions > a{margin-left: 10px;}
.space .menu {margin-left: 5px; margin-right:5px;}
.space .table-empty-tip {padding: 40px 10px;}
.space .spaceTitle.pull-left {overflow: hidden; white-space: nowrap; max-width: calc(100% - 255px)}
.space .spaceTitle .pull-left {overflow: hidden; white-space: nowrap; max-width: calc(100% - 255px)}
.spaceName {font-size: 16px; font-weight: bold;}
.spaceTitle .icon-cube {font-size: 16px;}
.spaceDesc {font-size: 13px; color: #838A9D; margin: -5px 0 5px 18px;}
+1
View File
@@ -144,3 +144,4 @@
#main > .container {padding: 0px 0px 0px 10px; margin: -10px 0px 0px 0px;}
@media screen and (max-width: 1366px){#main > .container {padding: 0px 10px 0px 10px; margin: -10px 0px 0px 0px;}}
.panel-body {padding: 0px;}
#kanbanContainer {background: #efefef; box-shadow: none;}
+9 -7
View File
@@ -1304,9 +1304,10 @@ class kanbanModel extends model
if($cell->type == 'task')
{
if($searchValue != '' and strpos($object->name, $searchValue) === false) continue;
$cardData['name'] = $object->name;
$cardData['status'] = $object->status;
$cardData['left'] = $object->left;
$cardData['name'] = $object->name;
$cardData['status'] = $object->status;
$cardData['left'] = $object->left;
$cardData['estStarted'] = $object->estStarted;
}
else
{
@@ -1414,9 +1415,10 @@ class kanbanModel extends model
if($lane->type == 'task')
{
$cardData['name'] = $object->name;
$cardData['status'] = $object->status;
$cardData['left'] = $object->left;
$cardData['name'] = $object->name;
$cardData['status'] = $object->status;
$cardData['left'] = $object->left;
$cardData['estStarted'] = $object->estStarted;
}
else
{
@@ -1575,7 +1577,7 @@ class kanbanModel extends model
$laneData['cards'][$column->columnType][] = $cardData;
$cardOrder ++;
}
if(empty($searchValue) and !isset($laneData['cards'][$column->columnType])) $laneData['cards'][$column->columnType] = array();
if($searchValue != '' and !isset($laneData['cards'][$column->columnType])) $laneData['cards'][$column->columnType] = array();
}
if($searchValue != '' and empty($laneData['cards'])) continue;
+2 -1
View File
@@ -129,7 +129,8 @@
<div class='kanban-desc' title="<?php echo strip_tags(htmlspecialchars_decode($kanban->desc));?>"><?php echo strip_tags(htmlspecialchars_decode($kanban->desc));?></div>
<div class='kanban-footer'>
<?php $count = 0;?>
<?php $teamPairs = array_filter(explode(',', $kanban->team));?>
<?php $teamPairs = array_filter(explode(',', ",$kanban->createdBy,$kanban->owner,$kanban->team"));?>
<?php $teamPairs = array_unique($teamPairs);?>
<?php
foreach($teamPairs as $index => $team)
{
Regular → Executable
+8 -2
View File
@@ -89,8 +89,14 @@ class messageModel extends model
}
}
$moduleName = $objectType == 'case' ? 'testcase' : $objectType;
$this->loadModel('mail')->sendmail($objectID, $actionID);
if($objectType == 'feedback')
{
$this->loadModel('feedback')->sendmail($objectID, $actionID);
}
else
{
$this->loadModel('mail')->sendmail($objectID, $actionID);
}
if(defined('RUN_MODE') and RUN_MODE == 'api') $config->requestType = $requestType;
}
+20 -5
View File
@@ -411,9 +411,12 @@ EOF;
* @access public
* @return void
*/
public function task($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function task($type = 'assignedTo', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->loadModel('task');
$this->loadModel('execution');
$queryID = ($type == 'bySearch') ? (int)$param : 0;
/* Save session. */
if($this->app->viewType != 'json') $this->session->set('taskList', $this->app->getURI(true), 'execution');
@@ -430,9 +433,13 @@ EOF;
{
$tasks = $this->my->getAssignedByMe($this->app->user->account, 0, $pager, $sort, 0, 'task');
}
elseif($type == 'bySearch')
{
$tasks = $this->my->getTasksBySearch($this->app->user->account, 0, $pager, $sort, $queryID);
}
else
{
$tasks = $this->task->getUserTasks($this->app->user->account, $type, 0, $pager, $sort);
$tasks = $this->task->getUserTasks($this->app->user->account, $type, 0, $pager, $sort, $queryID);
}
$parents = array();
@@ -473,6 +480,9 @@ EOF;
/* Get the story language configuration. */
$this->app->loadLang('story');
$actionURL = $this->createLink('my', $this->app->rawMethod, "mode=task&browseType=bySearch&queryID=myQueryID");
$this->my->buildTaskSearchForm($queryID, $actionURL);
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->task;
$this->view->position[] = $this->lang->my->task;
@@ -505,12 +515,13 @@ EOF;
* @access public
* @return void
*/
public function bug($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function bug($type = 'assignedTo', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. load Lang. */
$this->loadModel('bug');
if($this->app->viewType != 'json') $this->session->set('bugList', $this->app->getURI(true), 'qa');
$this->app->loadLang('bug');
$queryID = ($type == 'bySearch') ? (int)$param : 0;
if($this->app->viewType != 'json') $this->session->set('bugList', $this->app->getURI(true), 'qa');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -525,12 +536,16 @@ EOF;
}
else
{
$bugs = $this->loadModel('bug')->getUserBugs($this->app->user->account, $type, $sort, 0, $pager);
$bugs = $this->loadModel('bug')->getUserBugs($this->app->user->account, $type, $sort, 0, $pager, '', $queryID);
}
$bugs = $this->bug->checkDelayedBugs($bugs);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', false);
$actionURL = $this->createLink('my', $this->app->rawMethod, "mode=bug&browseType=bySearch&queryID=myQueryID");
$this->my->buildBugSearchForm($queryID, $actionURL);
/* assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->bug;
$this->view->position[] = $this->lang->my->bug;
+1
View File
@@ -44,6 +44,7 @@ $lang->my->storyConcept = 'Story Concept';
$lang->my->pri = 'Priority';
$lang->my->alert = 'You can click on your profile at the top right and select "Preference" to modify your information. ';
$lang->my->assignedToMe = 'AssignedToMe';
$lang->my->byQuery = 'Search';
$lang->my->indexAction = 'My Index';
$lang->my->calendarAction = 'My Calendar';
+1
View File
@@ -44,6 +44,7 @@ $lang->my->storyConcept = $config->URAndSR ? '默认需求概念组合' : '
$lang->my->pri = '优先级';
$lang->my->alert = '后续您可以点击右上方的头像,选择“个性化设置”修改信息。';
$lang->my->assignedToMe = '指派给我';
$lang->my->byQuery = '搜索';
$lang->my->indexAction = '地盘仪表盘';
$lang->my->calendarAction = '我的日程';
+164
View File
@@ -458,4 +458,168 @@ class myModel extends model
}
return $cases;
}
/**
* Build search form for task page of work.
*
* @param int $queryID
* @param string $actionURL
* @access public
* @return void
*/
public function buildTaskSearchForm($queryID, $actionURL)
{
$rawMethod = $this->app->rawMethod;
$this->loadModel('execution');
$this->app->loadConfig('execution');
$this->config->execution->search['module'] = $rawMethod . 'Task';
$this->config->execution->search['actionURL'] = $actionURL;
$this->config->execution->search['queryID'] = $queryID;
if($rawMethod == 'work')
{
unset($this->config->execution->search['fields']['closedReason']);
unset($this->config->execution->search['fields']['closedBy']);
unset($this->config->execution->search['fields']['canceledBy']);
unset($this->config->execution->search['fields']['closedDate']);
unset($this->config->execution->search['fields']['canceledDate']);
}
$projects = $this->loadModel('project')->getPairsByProgram();
$this->config->execution->search['params']['project']['values'] = $projects + array('all' => $this->lang->project->allProjects);
$executions = $this->execution->getPairs();
$this->config->execution->search['params']['execution']['values'] = $executions + array('all' => $this->lang->execution->allExecutions);
$this->config->execution->search['params']['module']['values'] = $this->loadModel('tree')->getAllModulePairs();
$this->loadModel('search')->setSearchParams($this->config->execution->search);
}
/**
* Get tasks by search.
*
* @param string $account
* @param int $limit
* @param object $pager
* @param string $orderBy
* @param int $queryID
* @access public
* @return array
*/
public function getTasksBySearch($account, $limit = 0, $pager = null, $orderBy = 'id_desc', $queryID = 0)
{
$moduleName = $this->app->rawMethod == 'work' ? 'workTask' : 'contributeTask';
$queryName = $moduleName . 'Query';
$formName = $moduleName . 'Form';
$taskIDList = array();
if($moduleName == 'contributeTask')
{
$tasksAssignedByMe = $this->getAssignedByMe($account, 0, $pager, $orderBy, 0, 'task');
foreach($tasksAssignedByMe as $taskID => $task)
{
$taskIDList[$taskID] = $taskID;
}
}
if($queryID)
{
$query = $this->loadModel('search')->getQuery($queryID);
if($query)
{
$this->session->set($queryName, $query->sql);
$this->session->set($formName, $query->form);
}
else
{
$this->session->set($queryName, ' 1 = 1');
}
}
else
{
if($this->session->$queryName == false) $this->session->set($queryName, ' 1 = 1');
}
$query = $this->session->$queryName;
$query = preg_replace('/`(\w+)`/', 't1.`$1`', $query);
$query = str_replace('t1.`project`', 't2.`project`', $query);
$tasks = $this->dao->select('t1.*, t2.id as executionID, t2.name as executionName, t2.type as executionType, t3.id as storyID, t3.title as storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion')
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on("t1.execution = t2.id")
->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id')
->leftJoin(TABLE_PROJECT)->alias('t4')->on("t1.project = t4.id")
->where($query)
->andWhere('t1.deleted')->eq(0)
->andWhere('t2.deleted')->eq(0)
->andWhere('(t2.status')->ne('suspended')->orWhere('t4.status')->ne('suspended')->markRight(1)
->beginIF($moduleName == 'workTask')->andWhere("t1.assignedTo")->eq($account)
->beginIF($moduleName == 'contributeTask')
->andWhere('t1.openedBy', 1)->eq($account)
->orWhere('t1.closedBy')->eq($account)
->orWhere('t1.canceledBy')->eq($account)
->orWhere('t1.finishedby', 1)->eq($account)
->orWhere('t1.finishedList')->like("%,{$account},%")
->orWhere('t1.id')->in($taskIDList)
->markRight(1)
->fi()
->beginIF($this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi()
->beginIF($this->config->vision)->andWhere('t2.vision')->eq($this->config->vision)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in($this->app->user->view->sprints)->fi()
->orderBy($orderBy)
->beginIF($limit > 0)->limit($limit)->fi()
->page($pager)
->fetchAll('id');
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', false);
$taskTeam = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in(array_keys($tasks))->andWhere('type')->eq('task')->fetchGroup('root');
if(!empty($taskTeam))
{
foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team;
}
if($tasks) return $this->loadModel('task')->processTasks($tasks);
return array();
}
/**
* Build search form for bug page of work.
*
* @param int $queryID
* @param string $actionURL
* @access public
* @return void
*/
public function buildBugSearchForm($queryID, $actionURL)
{
$rawMethod = $this->app->rawMethod;
$this->loadModel('bug');
$this->app->loadConfig('bug');
$products = $this->loadModel('product')->getPairs();
$this->config->bug->search['module'] = $rawMethod . 'Bug';
$this->config->bug->search['actionURL'] = $actionURL;
$this->config->bug->search['queryID'] = $queryID;
if($rawMethod == 'work')
{
unset($this->config->bug->search['fields']['closedDate']);
unset($this->config->bug->search['fields']['closedBy']);
}
if($this->config->systemMode == 'new') $this->config->bug->search['params']['project']['values'] = $this->loadModel('project')->getPairsByProgram() + array('all' => $this->lang->bug->allProject) + array('' => '');
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('execution')->getPairs();
$this->config->bug->search['params']['product']['values'] = $products + array('' => '');
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs();
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getAllModulePairs();
$this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList;
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($products);
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
$this->loadModel('search')->setSearchParams($this->config->bug->search);
}
}
+9 -1
View File
@@ -25,15 +25,23 @@
echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->bug->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedBy"), "<span class='text'>{$lang->bug->assignedByMe}</span>" . ($type == 'assignedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedBy' ? ' btn-active-text' : '') . "'");
}
else
{
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedTo"), "<span class='text'>{$lang->bug->assignedToMe}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
}
?>
</div>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->my->byQuery;?></a>
</div>
<div id="mainContent">
<?php $dataModule = $app->rawMethod == 'work' ? 'workBug' : 'contributeBug';?>
<?php if(empty($bugs)):?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $dataModule;?>></div>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->bug->noBug;?></span></p>
</div>
<?php else:?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $dataModule;?>></div>
<form id='myBugForm' class="main-table table-bug" data-ride="table" method="post" action='<?php echo $this->createLink('bug', 'batchEdit', "productID=0");?>'>
<?php
$canBatchEdit = (common::hasPriv('bug', 'batchEdit') and $type == 'assignedTo');
@@ -43,7 +51,7 @@
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchAssignTo);
?>
<table class="table has-sort-head table-fixed" id='bugList'>
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php $vars = "mode=$mode&type=$type&param=myQueryID&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr>
<th class="c-id">
+17 -8
View File
@@ -18,29 +18,38 @@
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php $recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>"; ?>
<?php if($app->rawMethod == 'contribute'):?>
<?php
echo html::a(inlink($app->rawMethod, "mode=$mode&type=openedBy"), "<span class='text'>{$lang->my->taskMenu->openedByMe}</span>" . ($type == 'openedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=finishedBy"), "<span class='text'>{$lang->my->taskMenu->finishedByMe}</span>" . ($type == 'finishedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'finishedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->my->taskMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=canceledBy"), "<span class='text'>{$lang->my->taskMenu->canceledByMe}</span>" . ($type == 'canceledBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'canceledBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedBy"), "<span class='text'>{$lang->my->taskMenu->assignedByMe}</span>" . ($type == 'assignedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedBy' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute')
{
echo html::a(inlink($app->rawMethod, "mode=$mode&type=openedBy"), "<span class='text'>{$lang->my->taskMenu->openedByMe}</span>" . ($type == 'openedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=finishedBy"), "<span class='text'>{$lang->my->taskMenu->finishedByMe}</span>" . ($type == 'finishedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'finishedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=closedBy"), "<span class='text'>{$lang->my->taskMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=canceledBy"), "<span class='text'>{$lang->my->taskMenu->canceledByMe}</span>" . ($type == 'canceledBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'canceledBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedBy"), "<span class='text'>{$lang->my->taskMenu->assignedByMe}</span>" . ($type == 'assignedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedBy' ? ' btn-active-text' : '') . "'");
}
else
{
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedTo"), "<span class='text'>{$lang->my->taskMenu->assignedToMe}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
}
?>
<?php endif;?>
</div>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->my->byQuery;?></a>
</div>
<div id="mainContent">
<?php $dataModule = $app->rawMethod == 'work' ? 'workTask' : 'contributeTask';?>
<?php if(empty($tasks)):?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $dataModule;?>></div>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->task->noTask;?></span></p>
</div>
<?php else:?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $dataModule;?>></div>
<form id='myTaskForm' class="main-table table-task skip-iframe-modal" method="post">
<?php $canBatchEdit = (common::hasPriv('task', 'batchEdit') and $type == 'assignedTo');?>
<?php $canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');?>
<div class="table-responsive">
<table class="table has-sort-head table-fixed" id='taskTable'>
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php $vars = "mode=$mode&type=$type&param=myQueryID&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr>
<th class="c-id">
+1 -1
View File
@@ -1201,7 +1201,7 @@ class product extends control
* @access public
* @return void
*/
public function all($browseType = 'noclosed', $orderBy = 'program_asc,order_asc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function all($browseType = 'noclosed', $orderBy = 'program_asc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Load module and set session. */
$this->loadModel('program');
+29 -13
View File
@@ -339,19 +339,35 @@ class productModel extends model
if(!empty($append) and is_array($append)) $append = implode(',', $append);
$views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append";
$orderBy = !empty($this->config->product->orderBy) ? $this->config->product->orderBy : 'isClosed';
$products = $this->dao->select('*, IF(INSTR(" closed", status) < 2, 0, 1) AS isClosed')
->from(TABLE_PRODUCT)
->where(1)
->beginIF(strpos($mode, 'all') === false)->andWhere('deleted')->eq(0)->fi()
->beginIF($programID)->andWhere('program')->eq($programID)->fi()
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('id')->in($views)->fi()
->andWhere('vision')->eq($this->config->vision)
->orderBy($orderBy)
->fetchPairs('id', 'name');
return $products;
$views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append";
if($this->config->systemMode == 'new')
{
/* Order by program. */
return $this->dao->select('t1.*, IF(INSTR(" closed", t1.status) < 2, 0, 1) AS isClosed')->from(TABLE_PRODUCT)->alias('t1')
->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
->where(1)
->beginIF(strpos($mode, 'all') === false)->andWhere('t1.deleted')->eq(0)->fi()
->beginIF($programID)->andWhere('t1.program')->eq($programID)->fi()
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('t1.status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('t1.id')->in($views)->fi()
->andWhere('t1.vision')->eq($this->config->vision)
->orderBy('isClosed, t2.order_asc, t1.line_desc, t1.order_desc')
->fetchPairs('id', 'name');
}
else
{
$orderBy = !empty($this->config->product->orderBy) ? $this->config->product->orderBy : 'isClosed';
return $this->dao->select('*, IF(INSTR(" closed", status) < 2, 0, 1) AS isClosed')
->from(TABLE_PRODUCT)
->where(1)
->beginIF(strpos($mode, 'all') === false)->andWhere('deleted')->eq(0)->fi()
->beginIF($programID)->andWhere('program')->eq($programID)->fi()
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('id')->in($views)->fi()
->andWhere('vision')->eq($this->config->vision)
->orderBy($orderBy)
->fetchPairs('id', 'name');
}
}
/**
+1
View File
@@ -62,6 +62,7 @@ $lang->project->workdaysExceed = 'No more than『%s』working days';
$lang->project->teamMembersCount = ', there are %s team members.';
$lang->project->budgetNumber = '『Budget』must be numbers.';
$lang->project->budgetGe0 = '『Budget』must be greater than or equal to 0.';
$lang->project->allProjects = 'All Projects';
/* Fields. */
$lang->project->common = 'Project';
+1
View File
@@ -62,6 +62,7 @@ $lang->project->workdaysExceed = '可用工作日不能超过『%s』天';
$lang->project->teamMembersCount = ',团队成员共%s人。';
$lang->project->budgetNumber = '『预算』金额必须为数字。';
$lang->project->budgetGe0 = '『预算』金额必须大于等于0。';
$lang->project->allProjects = '所有项目';
/* Fields. */
$lang->project->common = '项目';
+17 -13
View File
@@ -685,8 +685,9 @@ class story extends control
$execution = $this->execution->getByID($this->session->execution);
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup);
$kanbanData = json_encode($kanbanData);
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -1057,10 +1058,11 @@ class story extends control
$execution = $this->execution->getByID($this->session->execution);
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -1363,10 +1365,11 @@ class story extends control
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
$this->loadModel('kanban')->updateLane($this->session->execution, 'story', $storyID);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -1716,9 +1719,10 @@ class story extends control
$execution = $this->execution->getByID($this->session->execution);
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $kanbanGroup);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $kanbanGroup, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
+1
View File
@@ -2986,6 +2986,7 @@ class storyModel extends model
->beginIF($moduleIdList)->andWhere('t2.module')->in($moduleIdList)->fi()
->beginIF($status == 'unclosed')->andWhere('t2.status')->ne('closed')->fi()
->beginIF($status == 'review')->andWhere('t2.status')->in('draft,changed')->fi()
->beginIF($status == 'active')->andWhere('t2.status')->eq('active')->fi()
->orderBy('t1.`order` desc, t1.`story` desc')
->fetchAll('id');
return empty($stories) ? array() : $this->formatStories($stories, $type);
+64 -54
View File
@@ -173,10 +173,11 @@ class task extends control
{
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, 0)"));
}
@@ -240,9 +241,7 @@ class task extends control
if(!isset($moduleOptionMenu[$task->module])) $task->module = 0;
}
$stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', '', 'full', 'unclosed');
if($this->config->vision == 'lite') $stories = $stories + array('', '');
$stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', '', 'full', 'active');
/* Get block id of assinge to me. */
$blockID = 0;
@@ -349,10 +348,11 @@ class task extends control
{
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, 0)"));
}
@@ -509,8 +509,9 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup);
$kanbanData = json_encode($kanbanData);
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -539,7 +540,7 @@ class task extends control
$this->view->title = $this->lang->task->edit . 'TASK' . $this->lang->colon . $this->view->task->name;
$this->view->position[] = $this->lang->task->common;
$this->view->position[] = $this->lang->task->edit;
$this->view->stories = $this->story->getExecutionStoryPairs($this->view->execution->id);
$this->view->stories = $this->story->getExecutionStoryPairs($this->view->execution->id, 0, 'all', '', 'full', 'active');
$this->view->tasks = $tasks;
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
$this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
@@ -729,8 +730,9 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup);
$kanbanData = json_encode($kanbanData);
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -977,11 +979,12 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
@@ -1041,10 +1044,11 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', 0, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -1177,11 +1181,12 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
@@ -1267,11 +1272,12 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
@@ -1325,10 +1331,11 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', 0, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
@@ -1398,11 +1405,12 @@ class task extends control
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
@@ -1563,11 +1571,12 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
@@ -1621,11 +1630,12 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
+1 -1
View File
@@ -161,7 +161,7 @@ $lang->task->recordEstimateAction = '添加工时';
$lang->task->ditto = '同上';
$lang->task->dittoNotice = "该任务与上一任务不属于同一%s!";
$lang->task->selectTestStory = "选择测试需求";
$lang->task->selectTestStory = "选择测试{$lang->SRCommon}";
$lang->task->selectAllUser = '全部';
$lang->task->noStory = "无{$lang->SRCommon}";
$lang->task->noAssigned = '未指派';
+3
View File
@@ -652,6 +652,9 @@ class upgradeModel extends model
case 'biz7.0.beta1':
$this->processViewFields();
break;
case 'biz7.0':
$this->processFlowPosition();
break;
}
}
@@ -3,7 +3,7 @@ $lang->message->typeList['xuanxuan'] = '聊天';
$lang->message->sender = '禅道项目管理';
$lang->message->notifyTitle = '%s 给您%s%d个%s';
$lang->message->notifyTitle = '%s %s%d个%s';
$lang->message->mr = new stdClass();
$lang->message->mr->logTitle = '构建日志';