Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -192,7 +192,7 @@ class userEntry extends Entry
|
||||
break;
|
||||
case 'task':
|
||||
$info->task = array('total' => 0, 'tasks' => array());
|
||||
if(!common::hasPriv('my', 'task')) break;
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
$control = $this->loadController('my', 'task');
|
||||
$control->task($this->param('type', 'assignedTo'), $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1));
|
||||
@@ -207,7 +207,7 @@ class userEntry extends Entry
|
||||
break;
|
||||
case 'bug':
|
||||
$info->bug = array('total' => 0, 'bugs' => array());
|
||||
if(!common::hasPriv('my', 'bug')) break;
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
$control = $this->loadController('my', 'bug');
|
||||
$control->bug($this->param('type', 'assignedTo'), $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1));
|
||||
@@ -263,7 +263,7 @@ class userEntry extends Entry
|
||||
break;
|
||||
case 'story':
|
||||
$info->story = array('total' => 0, 'stories' => array());
|
||||
if(!common::hasPriv('my', 'story')) break;
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
$control = $this->loadController('my', 'story');
|
||||
$control->story($this->param('type', 'assignedTo'), $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1));
|
||||
@@ -285,7 +285,7 @@ class userEntry extends Entry
|
||||
break;
|
||||
case 'issue':
|
||||
$info->issue = array('total' => 0, 'issues' => array());
|
||||
if(!common::hasPriv('my', 'issue')) break;
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
@@ -302,7 +302,7 @@ class userEntry extends Entry
|
||||
break;
|
||||
case 'risk':
|
||||
$info->risk = array('total' => 0, 'risks' => array());
|
||||
if(!common::hasPriv('my', 'risk')) break;
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
@@ -319,7 +319,7 @@ class userEntry extends Entry
|
||||
break;
|
||||
case 'meeting':
|
||||
$info->meeting = array('total' => 0, 'meetings' => array());
|
||||
if(!common::hasPriv('my', 'myMeeting')) break;
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
|
||||
@@ -6,6 +6,9 @@ ALTER TABLE `zt_kanbanspace` ADD COLUMN `activatedDate` datetime NOT NULL AFTER
|
||||
ALTER TABLE `zt_kanban` ADD COLUMN `activatedBy` char(30) NOT NULL AFTER `closedDate`;
|
||||
ALTER TABLE `zt_kanban` ADD COLUMN `activatedDate` datetime NOT NULL AFTER `activatedBy`;
|
||||
|
||||
ALTER TABLE `zt_task` ADD COLUMN `mode` varchar(10) NOT NULL AFTER `type`;
|
||||
UPDATE `zt_task` SET mode = 'linear' WHERE `id` IN (SELECT root FROM `zt_team` WHERE type = 'task');
|
||||
|
||||
DELETE FROM `zt_workflowaction` WHERE `module`='program' AND `action`='view';
|
||||
DELETE FROM `zt_workflowaction` WHERE `module`='story' AND `action`='browse';
|
||||
DELETE FROM `zt_workflowaction` WHERE `module`='task' AND `action`='browse';
|
||||
|
||||
@@ -1464,6 +1464,7 @@ CREATE TABLE IF NOT EXISTS `zt_task` (
|
||||
`fromIssue` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`type` varchar(20) NOT NULL,
|
||||
`mode` varchar(10) NOT NULL,
|
||||
`pri` tinyint(3) unsigned NOT NULL default '0',
|
||||
`estimate` float unsigned NOT NULL,
|
||||
`consumed` float unsigned NOT NULL,
|
||||
|
||||
@@ -340,6 +340,7 @@ $config->bug->datatable->fieldList['actions']['width'] = '150';
|
||||
$config->bug->datatable->fieldList['actions']['required'] = 'yes';
|
||||
|
||||
$config->bug->colorList = new stdclass();
|
||||
$config->bug->colorList->pri[0] = '#c0c0c0';
|
||||
$config->bug->colorList->pri[1] = '#d50000';
|
||||
$config->bug->colorList->pri[2] = '#ff9800';
|
||||
$config->bug->colorList->pri[3] = '#2098ee';
|
||||
|
||||
@@ -66,7 +66,8 @@ class bug extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$products = $this->product->getPairs('', 0, 'program_asc');
|
||||
$mode = (empty($this->config->CRProduct)) ? 'noclosed' : '';
|
||||
$products = $this->product->getPairs($mode, 0, 'program_asc');
|
||||
}
|
||||
$this->view->products = $this->products = $products;
|
||||
}
|
||||
|
||||
@@ -807,6 +807,7 @@ function setBranchRelated(branchID, productID, num)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#customField').click(function()
|
||||
@@ -823,6 +824,4 @@ $(document).ready(function()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ $(function()
|
||||
$('.table-wrapper').each(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
$this.css('max-height', $this.closest('.table').find('.chart-wrapper').outerHeight());
|
||||
$this.css('max-height', $this.closest('.table-row.chart-row').find('.chart-wrapper').outerHeight());
|
||||
});
|
||||
};
|
||||
resizeChartTable();
|
||||
|
||||
@@ -2218,7 +2218,7 @@ class bugModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('severity AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->severityList[$severity];
|
||||
foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->report->bugsPerSeverity->graph->xAxisName . ':' . $this->lang->bug->severityList[$severity];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,12 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo zget($lang->bug->statusList, $bug->status);?></td>
|
||||
<td>
|
||||
<?php
|
||||
echo zget($lang->bug->statusList, $bug->status);
|
||||
echo html::hidden('status', $bug->status);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->confirmed;?></th>
|
||||
|
||||
@@ -664,11 +664,7 @@ class commonModel extends model
|
||||
$params = "productID=$productID&branch=&moduleID=0&from=¶m=0&storyID=0&extras=from=global";
|
||||
break;
|
||||
case 'execution':
|
||||
$projectID = 0;
|
||||
if(in_array($app->tab, array('project', 'execution')) and isset($lang->switcherMenu))
|
||||
{
|
||||
$projectID = isset($_SESSION['project']) ? $_SESSION['project'] : 0;
|
||||
}
|
||||
$projectID = isset($_SESSION['project']) ? $_SESSION['project'] : 0;
|
||||
$params = "projectID={$projectID}&executionID=0©ExecutionID=0&planID=0&confirm=no&productID=0&extra=from=global";
|
||||
break;
|
||||
case 'product':
|
||||
@@ -2300,7 +2296,7 @@ EOD;
|
||||
|
||||
if(isset($this->app->user))
|
||||
{
|
||||
if(in_array($module, $this->config->programPriv->waterfall) and $this->app->tab == 'project') return true;
|
||||
if(in_array($module, $this->config->programPriv->waterfall) and $this->app->tab == 'project' and $method != 'browse') return true;
|
||||
|
||||
$this->app->user = $this->session->user;
|
||||
if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method);
|
||||
|
||||
@@ -36,7 +36,7 @@ $('[name*=unitList]').change(function()
|
||||
|
||||
$('#submit').click(function()
|
||||
{
|
||||
if(module == 'testcase' && field == 'review' && stopSubmit)
|
||||
if(module == 'testcase' && field == 'review' && stopSubmit && oldNeedReview)
|
||||
{
|
||||
var needReview = $('input:radio[name="needReview"]:checked').val();
|
||||
stopSubmit = false;
|
||||
|
||||
@@ -128,6 +128,7 @@ EOT;
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($module == 'testcase'):?>
|
||||
<?php js::set('oldNeedReview', $needReview);?>
|
||||
<tr <?php if($needReview) echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->custom->forceReview;?></th>
|
||||
<td><?php echo html::select('forceReview[]', $users, $forceReview, "class='form-control chosen' multiple");?></td>
|
||||
|
||||
@@ -220,9 +220,12 @@ class design extends control
|
||||
*/
|
||||
public function view($designID = 0)
|
||||
{
|
||||
$design = $this->design->getByID($designID);
|
||||
$design = $this->design->getByID($designID);
|
||||
$productID = $this->commonAction($design->project, $design->product, $designID);
|
||||
|
||||
$this->session->set('revisionList', $this->app->getURI(true));
|
||||
$this->session->set('storyList', $this->app->getURI(true), 'product');
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->view;
|
||||
$this->view->position[] = $this->lang->design->view;
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ class designModel extends model
|
||||
|
||||
$design->commit = '';
|
||||
$relations = $this->loadModel('common')->getRelations('design', $designID, 'commit');
|
||||
foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID&projectID={$design->project}"), "#$relation->BID", '', "class=iframe");
|
||||
foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID&projectID={$design->project}"), "#$relation->BID");
|
||||
|
||||
return $this->loadModel('file')->replaceImgURL($design, 'desc');
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->story;?></th>
|
||||
<td><?php echo $design->story ? html::a($this->createLink('story', 'view', "id=$design->story", '', true), zget($stories, $design->story), '',"class=iframe") : '';?></td>
|
||||
<td><?php echo $design->story ? html::a($this->createLink('story', 'view', "id=$design->story"), zget($stories, $design->story)) : '';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->submission;?></th>
|
||||
|
||||
@@ -277,13 +277,13 @@
|
||||
common::printIcon('programplan', 'edit', "stageID=$child->id&projectID=$projectID", $child, 'list', '', '', 'iframe', true);
|
||||
|
||||
$disabled = !empty($child->children) ? ' disabled' : '';
|
||||
if(common::hasPriv('execution', 'close', $child) and $execution->status != 'closed')
|
||||
if(common::hasPriv('execution', 'close', $child) and $child->status != 'closed')
|
||||
{
|
||||
common::printIcon('execution', 'close', "stageID=$child->id", $child, 'list', 'off', '' , $disabled . ' iframe', true, '', $this->lang->programplan->close);
|
||||
}
|
||||
elseif(common::hasPriv('execution', 'activate', $child) and $execution->status == 'closed')
|
||||
elseif(common::hasPriv('execution', 'activate', $child) and $child->status == 'closed')
|
||||
{
|
||||
common::printIcon('execution', 'activate', "stageID=$child->id", $child, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate);
|
||||
common::printIcon('execution', 'activate', "stageID=$child->id", $child, 'list', 'magic', '' , $disabled . ' iframe', true, '', $this->lang->programplan->activate);
|
||||
}
|
||||
|
||||
if(common::hasPriv('execution', 'delete', $child))
|
||||
|
||||
@@ -5,6 +5,21 @@
|
||||
<?php if($execution->lifetime != 'ops') echo html::a($this->createLink('execution', 'linkstory', "executionID=$executionID"), $lang->execution->linkStory, '', "class='btn' data-app='execution'");?>
|
||||
<?php echo html::a($this->createLink('task', 'create', "execution=$executionID"), $lang->execution->createTask, '', "class='btn' data-app='execution'");?>
|
||||
<?php echo html::a($this->createLink('execution', 'task', "executionID=$executionID"), $lang->execution->goback, '', "class='btn' data-app='execution'");?>
|
||||
<?php echo html::a($this->createLink('project', 'execution', "status=all&projectID=$projectID"), $lang->execution->gobackExecution, '', "class='btn' data-app='project'");?>
|
||||
<?php echo html::a('javascript:void(0)', $lang->execution->gobackExecution, '', "class='btn' onclick='closeTipModal($projectID)' data-app='project'");?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
/**
|
||||
* Click the return to iteration list button to close tipModal.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function closeTipModal(projectID)
|
||||
{
|
||||
$(".close").trigger("click");
|
||||
var link = createLink('project', 'execution', 'status=all&projectID=' + projectID);
|
||||
$.apps.open(link, 'project');
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -620,6 +620,7 @@ $lang->resource->kanban->createSpace = 'createSpace';
|
||||
$lang->resource->kanban->editSpace = 'editSpace';
|
||||
$lang->resource->kanban->closeSpace = 'closeSpace';
|
||||
$lang->resource->kanban->deleteSpace = 'deleteSpace';
|
||||
$lang->resource->kanban->activateSpace = 'activateSpace';
|
||||
$lang->resource->kanban->sortSpace = 'sortSpace';
|
||||
$lang->resource->kanban->create = 'create';
|
||||
$lang->resource->kanban->edit = 'edit';
|
||||
@@ -714,6 +715,7 @@ $lang->kanban->methodOrder[225] = 'batchCreateCard';
|
||||
$lang->kanban->methodorder[230] = 'import';
|
||||
$lang->kanban->methodorder[235] = 'enableArchived';
|
||||
$lang->kanban->methodorder[240] = 'activate';
|
||||
$lang->kanban->methodorder[245] = 'activateSpace';
|
||||
|
||||
/* Execution. */
|
||||
$lang->resource->execution = new stdclass();
|
||||
|
||||
@@ -117,7 +117,7 @@ class kanban extends control
|
||||
/**
|
||||
* Activate a space.
|
||||
*
|
||||
* @param int $spaceID
|
||||
* @param int $spaceID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -100,6 +100,8 @@ $lang->kanban->closedDate = 'Closed Date';
|
||||
$lang->kanban->empty = 'No Kanban';
|
||||
$lang->kanban->teamSumCount = '%s people in total';
|
||||
$lang->kanban->cardCount = 'Card Count';
|
||||
$lang->kanban->activatedBy = 'Activated By';
|
||||
$lang->kanban->activatedDate = 'Activated Date';
|
||||
|
||||
$lang->kanban->createColumnOnLeft = 'Create Column On Left';
|
||||
$lang->kanban->createColumnOnRight = 'Create Column On Right';
|
||||
@@ -265,6 +267,8 @@ $lang->kanbanspace->lastEditedDate = 'Edited Date';
|
||||
$lang->kanbanspace->closedBy = 'Closed By';
|
||||
$lang->kanbanspace->closedDate = 'Closed Date';
|
||||
$lang->kanbanspace->type = 'Type';
|
||||
$lang->kanbanspace->activatedBy = 'Activated By';
|
||||
$lang->kanbanspace->activatedDate = 'Activated Date';
|
||||
|
||||
$lang->kanbanspace->empty = 'No Space';
|
||||
|
||||
|
||||
@@ -100,6 +100,8 @@ $lang->kanban->closedDate = '关闭日期';
|
||||
$lang->kanban->empty = '暂时没有看板';
|
||||
$lang->kanban->teamSumCount = '共%s人';
|
||||
$lang->kanban->cardCount = '卡片数量';
|
||||
$lang->kanban->activatedBy = '由谁激活';
|
||||
$lang->kanban->activatedDate = '激活日期';
|
||||
|
||||
$lang->kanban->createColumnOnLeft = '在左侧添加看板列';
|
||||
$lang->kanban->createColumnOnRight = '在右侧添加看板列';
|
||||
@@ -265,6 +267,8 @@ $lang->kanbanspace->lastEditedDate = '最后修改日期';
|
||||
$lang->kanbanspace->closedBy = '由谁关闭';
|
||||
$lang->kanbanspace->closedDate = '关闭日期';
|
||||
$lang->kanbanspace->type = '空间类型';
|
||||
$lang->kanbanspace->activatedBy = '由谁激活';
|
||||
$lang->kanbanspace->activatedDate = '激活日期';
|
||||
|
||||
$lang->kanbanspace->empty = '暂时没有空间';
|
||||
|
||||
|
||||
@@ -1863,7 +1863,7 @@ class kanbanModel extends model
|
||||
/**
|
||||
* Activate a space.
|
||||
*
|
||||
* @param int $spaceID
|
||||
* @param int $spaceID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -3703,7 +3703,6 @@ class kanbanModel extends model
|
||||
$count = $this->dao->select('COUNT(id) AS count')->from(TABLE_KANBANLANE)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('region')->eq($object->region)
|
||||
->beginIF($action == 'deletelane')->andWhere('type')->eq($object->type)->fi()
|
||||
->beginIF($action == 'sortlane')->andWhere('`group`')->eq($object->group)->fi()
|
||||
->fetch('count');
|
||||
return $count > 1;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* The closespace file of kanban module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package kanban
|
||||
* @version $Id: activatespace.html.php 935 2021-12-15 11:22:24Z $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $space->id;?></span>
|
||||
<?php echo "<span title='$space->name'>" . $space->name . '</span>';?>
|
||||
</h2>
|
||||
</div>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='c-comment'><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center form-actions'>
|
||||
<?php echo html::submitButton($lang->kanban->activateSpace);?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<hr class='small' />
|
||||
<div class='main'><?php include '../../common/view/action.html.php';?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -55,7 +55,7 @@
|
||||
<?php if($class == 'disabled'):?>
|
||||
<?php common::printLink('kanban', 'activateSpace', "spaceID={$space->id}", '<i class="icon icon-magic"></i> ' . $lang->activate, '', "class='iframe'", '', true);?>
|
||||
<?php else:?>
|
||||
<?php common::printLink('kanban', 'closeSpace', "spaceID={$space->id}", '<i class="icon icon-close"></i> ' . $lang->close, '', "class='iframe'", '', true);?>
|
||||
<?php common::printLink('kanban', 'closeSpace', "spaceID={$space->id}", '<i class="icon icon-off"></i> ' . $lang->close, '', "class='iframe'", '', true);?>
|
||||
<?php endif;?>
|
||||
<?php common::printLink('kanban', 'deleteSpace', "spaceID={$space->id}", '<i class="icon icon-trash"></i> ' . $lang->delete, 'hiddenwin', '', '', true);?>
|
||||
</div>
|
||||
|
||||
@@ -695,10 +695,11 @@ EOF;
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function project($status = 'doing', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
public function project($status = 'doing', $recTotal = 0, $recPerPage = 15, $pageID = 1, $orderBy = 'id_desc')
|
||||
{
|
||||
$this->loadModel('program');
|
||||
$this->app->loadLang('project');
|
||||
@@ -713,7 +714,7 @@ EOF;
|
||||
|
||||
/* Get PM id list. */
|
||||
$accounts = array();
|
||||
$projects = $this->user->getObjects($this->app->user->account, 'project', $status, 'id_desc', $pager);
|
||||
$projects = $this->user->getObjects($this->app->user->account, 'project', $status, $orderBy, $pager);
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if(!empty($project->PM) and !in_array($project->PM, $accounts)) $accounts[] = $project->PM;
|
||||
@@ -727,6 +728,10 @@ EOF;
|
||||
$this->view->PMList = $PMList;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->status = $status;
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,18 +30,19 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form class='main-table' id='projectForm' method='post' data-ride='table' data-checkable='false'>
|
||||
<table class='table table-fixed' id='projectList'>
|
||||
<table class='table has-sort-head table-fixed' id='projectList'>
|
||||
<?php $vars = "status=$status&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&orderBy=%s"; ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->project->name;?></th>
|
||||
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th><?php common::printOrderLink('name', $orderBy, $vars, $lang->project->name);?></th>
|
||||
<?php if($status == 'openedbyme'):?>
|
||||
<th class='c-status'> <?php echo $lang->project->status;?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->project->status);?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-date'><?php echo $lang->project->begin;?></th>
|
||||
<th class='c-date'><?php echo $lang->project->end;?></th>
|
||||
<th class='text-right c-budget'><?php echo $lang->project->budget;?></th>
|
||||
<th class='c-user'><?php echo $lang->project->PM;?></th>
|
||||
<th class='c-date'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->project->begin);?></th>
|
||||
<th class='c-date'><?php common::printOrderLink('end', $orderBy, $vars, $lang->project->end);?></th>
|
||||
<th class='text-right c-budget'><?php common::printOrderLink('budget', $orderBy, $vars, $lang->project->budget);?></th>
|
||||
<th class='c-user'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->project->PM);?></th>
|
||||
<th class='text-center c-actions-6'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -270,7 +270,7 @@ class productModel extends model
|
||||
->orWhere('t1.createdBy')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->orderBy('t1.order_asc')
|
||||
->orderBy('t1.program_asc,t1.order_asc')
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
@@ -2482,15 +2482,6 @@ class projectModel extends model
|
||||
global $lang;
|
||||
$project = $this->getByID($objectID);
|
||||
|
||||
if(isset($project->model) and $project->model == 'waterfall')
|
||||
{
|
||||
global $lang;
|
||||
$this->loadModel('execution');
|
||||
$lang->executionCommon = $lang->project->stage;
|
||||
|
||||
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
|
||||
}
|
||||
|
||||
$model = 'scrum';
|
||||
if($project) $model = $project->model;
|
||||
|
||||
@@ -2507,6 +2498,15 @@ class projectModel extends model
|
||||
$this->loadModel('common')->resetProjectPriv($objectID);
|
||||
if(!$this->common->isOpenMethod($moduleName, $methodName) and !commonModel::hasPriv($moduleName, $methodName)) $this->common->deny($moduleName, $methodName, false);
|
||||
|
||||
if(isset($project->model) and $project->model == 'waterfall')
|
||||
{
|
||||
global $lang;
|
||||
$this->loadModel('execution');
|
||||
$lang->executionCommon = $lang->project->stage;
|
||||
|
||||
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
|
||||
}
|
||||
|
||||
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
|
||||
|
||||
$this->saveState($objectID, $this->getPairsByProgram());
|
||||
|
||||
@@ -7,6 +7,22 @@ $(function()
|
||||
$form.css('min-height', $form.height());
|
||||
})
|
||||
|
||||
$('#repoForm').bind('DOMNodeInserted', function(e)
|
||||
{
|
||||
if($("#clientLabel").length > 0)
|
||||
{
|
||||
if($("#client").val() !== '' && $("#client").val().indexOf(" ") == -1)
|
||||
{
|
||||
$("#clientLabel").css('color', '#0c64eb');
|
||||
$("#client").attr('style', 'border-color: #0c64eb !important;box-shadow: 0 0 6px #0c64eb !important;');
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#client").removeAttr("style");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#gitlabHost').change(function()
|
||||
{
|
||||
host = $('#gitlabHost').val();
|
||||
|
||||
@@ -437,9 +437,12 @@ class storyModel extends model
|
||||
public function batchCreate($productID = 0, $branch = 0, $type = 'story')
|
||||
{
|
||||
$forceReview = $this->checkForceReview();
|
||||
|
||||
$reviewers = '';
|
||||
foreach($_POST['title'] as $index => $value)
|
||||
{
|
||||
if($_POST['title'][$index] and isset($_POST['reviewer'][$index])) $_POST['reviewer'][$index] = array_filter($_POST['reviewer'][$index]);
|
||||
if($_POST['title'][$index] and isset($_POST['reviewer'][$index]) and empty($_POST['reviewDitto'][$index])) $reviewers = $_POST['reviewer'][$index] = array_filter($_POST['reviewer'][$index]);
|
||||
if($_POST['title'][$index] and isset($_POST['reviewer'][$index]) and !empty($_POST['reviewDitto'][$index])) $_POST['reviewer'][$index] = $reviewers;
|
||||
if($_POST['title'][$index] and empty($_POST['reviewer'][$index]) and $forceReview)
|
||||
{
|
||||
dao::$errors[] = $this->lang->story->errorEmptyReviewedBy;
|
||||
@@ -478,15 +481,11 @@ class storyModel extends model
|
||||
|
||||
$extendFields = $this->getFlowExtendFields();
|
||||
$data = array();
|
||||
$reviewers = '';
|
||||
foreach($stories->title as $i => $title)
|
||||
{
|
||||
if(empty($title)) continue;
|
||||
|
||||
if(empty($stories->reviewer[$i]) and empty($stories->reviewerDitto[$i])) $stories->reviewer[$i] = array();
|
||||
$reviewers = (isset($stories->reviewDitto[$i])) ? $reviewers : $stories->reviewer[$i];
|
||||
$_POST['reviewer'][$i] = $reviewers;
|
||||
$stories->reviewer[$i] = $reviewers;
|
||||
|
||||
$story = new stdclass();
|
||||
$story->type = $type;
|
||||
|
||||
@@ -824,7 +824,7 @@ class task extends control
|
||||
$this->loadModel('action');
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
if(isset($muletipleTasks[$taskID]) and $task->assignedTo != $this->app->user->account) continue;
|
||||
if(isset($muletipleTasks[$taskID]) and $task->assignedTo != $this->app->user->account and $task->mode == 'linear') continue;
|
||||
if(isset($muletipleTasks[$taskID]) and !isset($muletipleTasks[$taskID][$this->post->assignedTo])) continue;
|
||||
|
||||
$changes = $this->task->assign($taskID);
|
||||
@@ -1207,7 +1207,7 @@ class task extends control
|
||||
}
|
||||
|
||||
$task = $this->view->task;
|
||||
$members = $this->loadModel('user')->getTeamMemberPairs($task->execution, 'execution', 'nodeleted');
|
||||
$members = $task->team ? $this->task->getMemberPairs($task) : $this->loadModel('user')->getTeamMemberPairs($task->execution, 'execution', 'nodeleted');
|
||||
$task->nextBy = $task->openedBy;
|
||||
|
||||
$this->view->users = $members;
|
||||
|
||||
@@ -23,6 +23,7 @@ function loadExecutionMembers(executionID)
|
||||
{
|
||||
$("#multipleBox").removeAttr("checked");
|
||||
$('.team-group').addClass('hidden');
|
||||
$(".modeBox").addClass("hidden");
|
||||
$.get(createLink('execution', 'ajaxGetMembers', 'executionID=' + executionID + '&assignedTo=' + $('#assignedTo').val()), function(data)
|
||||
{
|
||||
$('#assignedTo_chosen').remove();
|
||||
@@ -141,6 +142,7 @@ function setOwners(result)
|
||||
{
|
||||
$("#multipleBox").removeAttr("checked");
|
||||
$('.team-group').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#assignedTo, #assignedTo_chosen').removeClass('hidden');
|
||||
$('#assignedTo').next('.picker').removeClass('hidden');
|
||||
if(result == 'affair')
|
||||
@@ -150,6 +152,7 @@ function setOwners(result)
|
||||
$('#assignedTo').chosen();
|
||||
$('.affair').hide();
|
||||
$('.team-group').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#selectAllUser').removeClass('hidden');
|
||||
}
|
||||
else if($('#assignedTo').attr('multiple') == 'multiple')
|
||||
@@ -421,7 +424,7 @@ $(document).ready(function()
|
||||
|
||||
$(window).resize();
|
||||
|
||||
/* show team menu. */
|
||||
/* Show team menu. */
|
||||
$('[name^=multiple]').change(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
@@ -429,6 +432,7 @@ $(document).ready(function()
|
||||
$('#assignedTo, #assignedTo_chosen').addClass('hidden');
|
||||
$('#assignedTo').next('.picker').addClass('hidden');
|
||||
$('.team-group').removeClass('hidden');
|
||||
$('.modeBox').removeClass('hidden');
|
||||
$('#estimate').attr('readonly', true);
|
||||
}
|
||||
else
|
||||
@@ -436,6 +440,7 @@ $(document).ready(function()
|
||||
$('#assignedTo, #assignedTo_chosen').removeClass('hidden');
|
||||
$('#assignedTo').next('.picker').removeClass('hidden');
|
||||
$('.team-group').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#estimate').attr('readonly', false);
|
||||
}
|
||||
$('#dataPlanGroup').fixInputGroup();
|
||||
@@ -490,7 +495,7 @@ $(document).ready(function()
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#testStory_chosen,#story_chosen', function()
|
||||
$(document).on('click', '#testStory_chosen', function()
|
||||
{
|
||||
var $obj = $(this).prev('select');
|
||||
var value = $obj.val();
|
||||
|
||||
+65
-7
@@ -82,17 +82,29 @@ $(document).ready(function()
|
||||
if(checked)
|
||||
{
|
||||
$('#teamTr').removeClass('hidden');
|
||||
$('.modeBox').removeClass('hidden');
|
||||
$('#mode').removeAttr('disabled').trigger('chosen:updated');
|
||||
$('#parent').val('');
|
||||
$('#parent').trigger('chosen:updated');
|
||||
$('#parent').closest('tr').addClass('hidden');
|
||||
$('#estimate').attr('disabled', 'disabled');
|
||||
$('#left').attr('disabled', 'disabled');
|
||||
|
||||
var mode = $('#mode').val();
|
||||
if((mode == 'linear' && currentUser != oldAssignedTo) || !team[currentUser]) $('[name=assignedTo]').attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#teamTr').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#mode').attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
$('#parent').closest('tr').removeClass('hidden');
|
||||
$('#estimate').removeAttr('disabled');
|
||||
$('#left').removeAttr('disabled');
|
||||
$('[name=assignedTo]').removeAttr('disabled').trigger('chosen:updated');
|
||||
}
|
||||
|
||||
updateAssignedTo();
|
||||
});
|
||||
|
||||
/* Init task team manage dialog */
|
||||
@@ -156,11 +168,11 @@ $('#confirmButton').click(function()
|
||||
if(i <= j) return;
|
||||
if(value == $(this).val()) $(this).closest('tr').addClass('hidden');
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
$('select[name^=team]').closest('tr.hidden').remove();
|
||||
|
||||
var memberCount = '';
|
||||
var assignedTo = '';
|
||||
var totalEstimate = 0;
|
||||
var totalConsumed = oldConsumed;
|
||||
var totalLeft = 0;
|
||||
@@ -168,9 +180,6 @@ $('#confirmButton').click(function()
|
||||
{
|
||||
if($(this).find('option:selected').text() == '') return;
|
||||
|
||||
var account = $(this).find('option:selected').val();
|
||||
var realName = $(this).find('option:selected').text();
|
||||
assignedTo += "<option value='" + account + "' title='" + realName + "'>" + realName + "</option>";
|
||||
memberCount++;
|
||||
|
||||
estimate = parseFloat($(this).parents('td').next('td').find('[name^=teamEstimate]').val());
|
||||
@@ -185,8 +194,7 @@ $('#confirmButton').click(function()
|
||||
$('#estimate').val(totalEstimate);
|
||||
$('#consumedSpan').html(totalConsumed);
|
||||
$('#left').val(totalLeft);
|
||||
$('#assignedTo').html(assignedTo);
|
||||
$('#assignedTo').trigger('chosen:updated');
|
||||
updateAssignedTo();
|
||||
|
||||
if(memberCount < 2)
|
||||
{
|
||||
@@ -200,3 +208,53 @@ $('#confirmButton').click(function()
|
||||
}
|
||||
$('.close').click();
|
||||
});
|
||||
|
||||
/**
|
||||
* Update assignedTo.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function updateAssignedTo()
|
||||
{
|
||||
var html = '';
|
||||
var multiple = $('#multiple').prop('checked');
|
||||
var assignedTo = $('#assignedTo').val();
|
||||
if(multiple)
|
||||
{
|
||||
var isTeamMember = false;
|
||||
var mode = $('#mode').val();
|
||||
$('select[name^=team]').each(function()
|
||||
{
|
||||
if($(this).find('option:selected').text() == '') return;
|
||||
if($(this).val() == currentUser) isTeamMember = true;
|
||||
|
||||
var account = $(this).find('option:selected').val();
|
||||
var realName = $(this).find('option:selected').text();
|
||||
var selected = account == assignedTo ? 'selected' : '';
|
||||
|
||||
html += "<option value='" + account + "' title='" + realName + "'" + selected + ">" + realName + "</option>";
|
||||
|
||||
});
|
||||
|
||||
if(mode == 'multi' && isTeamMember)
|
||||
{
|
||||
$('[name=assignedTo]').removeAttr('disabled').trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(currentUser != oldAssignedTo || !isTeamMember) $('[name=assignedTo]').attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(key in members)
|
||||
{
|
||||
var selected = key == assignedTo ? 'selected' : '';
|
||||
html += "<option value='" + key + "' title='" + members[key] + "'" + selected + ">" + members[key] + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$('#assignedTo').html(html);
|
||||
$('#assignedTo').trigger('chosen:updated');
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ $lang->task->color = 'Color';
|
||||
$lang->task->name = 'Name';
|
||||
$lang->task->type = 'Typ';
|
||||
$lang->task->typeAB = 'Typ';
|
||||
$lang->task->mode = 'Mode';
|
||||
$lang->task->pri = 'Priorität';
|
||||
$lang->task->mailto = 'Mail an';
|
||||
$lang->task->estimate = 'Geplant(h)';
|
||||
@@ -131,6 +132,7 @@ $lang->task->parentAB = 'Hauptaufgabe';
|
||||
$lang->task->lblPri = 'P';
|
||||
$lang->task->lblHour = '(h)';
|
||||
$lang->task->lblTestStory = 'Story Tested';
|
||||
$lang->task->teamMember = 'Team Member';
|
||||
|
||||
$lang->task->ditto = 'Dito';
|
||||
$lang->task->dittoNotice = "Diese Aufgabe gehört nicht zum %s wie die Vorherige!";
|
||||
@@ -172,6 +174,9 @@ $lang->task->reasonList[''] = '';
|
||||
$lang->task->reasonList['done'] = 'Erledigt';
|
||||
$lang->task->reasonList['cancel'] = 'Abgebrochen';
|
||||
|
||||
$lang->task->modeList['linear'] = 'Serial';
|
||||
$lang->task->modeList['multi'] = 'Parallel';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = ' Weitere Aufgaben erfassen';
|
||||
$lang->task->afterChoices['toTaskList'] = 'Zurück zur Aufgabenliste';
|
||||
$lang->task->afterChoices['toStoryList'] = 'Zurück zur Storyliste';
|
||||
|
||||
@@ -72,6 +72,7 @@ $lang->task->color = 'Color';
|
||||
$lang->task->name = 'Name';
|
||||
$lang->task->type = 'Type';
|
||||
$lang->task->typeAB = 'Type';
|
||||
$lang->task->mode = 'Mode';
|
||||
$lang->task->sync2Gitlab = 'Sync to GitLab';
|
||||
$lang->task->pri = 'Priority';
|
||||
$lang->task->mailto = 'Mailto';
|
||||
@@ -149,6 +150,7 @@ $lang->task->parentAB = 'Parent';
|
||||
$lang->task->lblPri = 'P';
|
||||
$lang->task->lblHour = '(h)';
|
||||
$lang->task->lblTestStory = 'Story Tested';
|
||||
$lang->task->teamMember = 'Team Member';
|
||||
|
||||
/* Fields of zt_taskestimate. */
|
||||
$lang->task->task = 'Task';
|
||||
@@ -198,6 +200,9 @@ $lang->task->reasonList[''] = '';
|
||||
$lang->task->reasonList['done'] = 'Done';
|
||||
$lang->task->reasonList['cancel'] = 'Cancelled';
|
||||
|
||||
$lang->task->modeList['linear'] = 'Serial';
|
||||
$lang->task->modeList['multi'] = 'Parallel';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = ' Continue Adding Tasks';
|
||||
$lang->task->afterChoices['toTaskList'] = 'Go to Task List';
|
||||
$lang->task->afterChoices['toStoryList'] = 'Go to Story List';
|
||||
|
||||
@@ -68,6 +68,7 @@ $lang->task->color = 'Couleur';
|
||||
$lang->task->name = 'Nom';
|
||||
$lang->task->type = 'Type';
|
||||
$lang->task->typeAB = 'Type';
|
||||
$lang->task->mode = 'Mode';
|
||||
$lang->task->pri = 'Priorité';
|
||||
$lang->task->mailto = 'Mailto';
|
||||
$lang->task->estimate = 'Estimés';
|
||||
@@ -131,6 +132,7 @@ $lang->task->parentAB = 'Parent';
|
||||
$lang->task->lblPri = 'P';
|
||||
$lang->task->lblHour = '(h)';
|
||||
$lang->task->lblTestStory = 'Story Testée';
|
||||
$lang->task->teamMember = 'Team Member';
|
||||
|
||||
$lang->task->ditto = 'Idem';
|
||||
$lang->task->dittoNotice = "Cette Tâche n'est pas associée au %s comme la précédente peut l'être !";
|
||||
@@ -172,6 +174,9 @@ $lang->task->reasonList[''] = '';
|
||||
$lang->task->reasonList['done'] = 'Fait';
|
||||
$lang->task->reasonList['cancel'] = 'Annulé';
|
||||
|
||||
$lang->task->modeList['linear'] = 'Serial';
|
||||
$lang->task->modeList['multi'] = 'Parallel';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = ' Continuer Ajouter Tâches';
|
||||
$lang->task->afterChoices['toTaskList'] = 'Aller à la liste des Tâches';
|
||||
$lang->task->afterChoices['toStoryList'] = 'Aller à la liste des Stories';
|
||||
|
||||
@@ -72,6 +72,7 @@ $lang->task->color = '标题颜色';
|
||||
$lang->task->name = '任务名称';
|
||||
$lang->task->type = '任务类型';
|
||||
$lang->task->typeAB = '类型';
|
||||
$lang->task->mode = '任务模式';
|
||||
$lang->task->sync2Gitlab = '同步到GitLab';
|
||||
$lang->task->pri = '优先级';
|
||||
$lang->task->mailto = '抄送给';
|
||||
@@ -149,6 +150,7 @@ $lang->task->parentAB = '父';
|
||||
$lang->task->lblPri = 'P';
|
||||
$lang->task->lblHour = '(h)';
|
||||
$lang->task->lblTestStory = "测试{$lang->SRCommon}";
|
||||
$lang->task->teamMember = '团队成员';
|
||||
|
||||
/* Fields of zt_taskestimate. */
|
||||
$lang->task->task = '任务';
|
||||
@@ -198,6 +200,9 @@ $lang->task->reasonList[''] = '';
|
||||
$lang->task->reasonList['done'] = '已完成';
|
||||
$lang->task->reasonList['cancel'] = '已取消';
|
||||
|
||||
$lang->task->modeList['linear'] = '串行';
|
||||
$lang->task->modeList['multi'] = '并行';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = "继续为该{$lang->SRCommon}添加任务";
|
||||
$lang->task->afterChoices['toTaskList'] = '返回任务列表';
|
||||
$lang->task->afterChoices['toStoryList'] = "返回{$lang->SRCommon}列表";
|
||||
|
||||
+14
-1
@@ -133,6 +133,7 @@ class taskModel extends model
|
||||
|
||||
/* Fix Bug #2466 */
|
||||
if($this->post->multiple) $task->assignedTo = '';
|
||||
if(!$this->post->multiple or count(array_filter($this->post->team)) < 1) $task->mode = '';
|
||||
$this->dao->insert(TABLE_TASK)->data($task, $skip = 'gitlab,gitlabProject')
|
||||
->autoCheck()
|
||||
->batchCheck($requiredFields, 'notempty')
|
||||
@@ -895,6 +896,12 @@ class taskModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If a multiple task is assigned to a team member who is not the task, assign to the team member instead. */
|
||||
if(!$this->post->assignedTo and !empty($_POST['team']) and !in_array($oldTask->assignedTo, $this->post->team))
|
||||
{
|
||||
$_POST['assignedTo'] = reset($_POST['team']);
|
||||
}
|
||||
|
||||
/* When the selected parent task is a common task and has consumption, select other parent tasks. */
|
||||
if($this->post->parent > 0)
|
||||
{
|
||||
@@ -942,7 +949,7 @@ class taskModel extends model
|
||||
|
||||
->setIF($oldTask->name != $this->post->name || $oldTask->estStarted != $this->post->estStarted || $oldTask->deadline != $this->post->deadline, 'version', $oldTask->version + 1)
|
||||
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->stripTags($this->config->task->editor->edit['id'], $this->config->allowedTags)
|
||||
->cleanINT('execution,story,module')
|
||||
@@ -1007,6 +1014,10 @@ class taskModel extends model
|
||||
$task->assignedTo = key($teams);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$task->mode = '';
|
||||
}
|
||||
|
||||
$executionType = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('type');
|
||||
$requiredFields = "," . $this->config->task->edit->requiredFields . ",";
|
||||
@@ -1966,6 +1977,7 @@ class taskModel extends model
|
||||
{
|
||||
$oldChildrenTasks = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->eq($taskID)->fetchAll('id');
|
||||
unset($task->assignedTo);
|
||||
unset($task->id);
|
||||
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('parent')->eq((int)$taskID)->exec();
|
||||
$this->dao->update(TABLE_TASK)->set('assignedTo=openedBy')->where('parent')->eq((int)$taskID)->exec();
|
||||
if(!dao::isError() and count($oldChildrenTasks) > 0)
|
||||
@@ -2051,6 +2063,7 @@ class taskModel extends model
|
||||
{
|
||||
$oldChildrenTasks = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->eq($taskID)->fetchAll('id');
|
||||
unset($task->left);
|
||||
unset($task->id);
|
||||
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('parent')->eq((int)$taskID)->exec();
|
||||
$this->computeWorkingHours($taskID);
|
||||
if(!dao::isError() and count($oldChildrenTasks) > 0)
|
||||
|
||||
@@ -14,11 +14,15 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->transfer);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->transfer);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -87,7 +87,7 @@ js::set('dittoNotice', $dittoNotice);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<?php $disableAssignedTo = (isset($teams[$taskID]) and $tasks[$taskID]->assignedTo != $this->app->user->account) ? "disabled='disabled'" : '';?>
|
||||
<?php $disableAssignedTo = (isset($teams[$taskID]) and (($tasks[$taskID]->assignedTo != $this->app->user->account and $tasks[$taskID]->mode == 'linear') or !isset($teams[$taskID][$app->user->account]))) ? "disabled='disabled'" : '';?>
|
||||
<?php $disableHour = (isset($teams[$taskID]) or $tasks[$taskID]->parent < 0) ? "disabled='disabled'" : '';?>
|
||||
<?php
|
||||
$members = array('' => '', 'ditto' => $this->lang->task->ditto);
|
||||
|
||||
@@ -77,6 +77,10 @@
|
||||
<button id='selectAllUser' type="button" class="btn btn-link<?php if($task->type !== 'affair') echo ' hidden';?>"><?php echo $lang->task->selectAllUser;?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='hidden modeBox'>
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<td><?php echo html::select('mode', $lang->task->modeList, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php if($execution->type == 'kanban'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->kanbancard->region;?></th>
|
||||
@@ -98,7 +102,7 @@
|
||||
<td colspan='3'>
|
||||
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', '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) or !isset($stories[$task->story])) ? '': $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>
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
<?php js::set('oldExecutionID', $task->execution);?>
|
||||
<?php js::set('oldConsumed', $task->consumed);?>
|
||||
<?php js::set('taskStatus', $task->status);?>
|
||||
<?php js::set('currentUser', $app->user->account);?>
|
||||
<?php js::set('team', $task->team);?>
|
||||
<?php js::set('members', $members);?>
|
||||
<?php js::set('confirmChangeExecution', $lang->task->confirmChangeExecution);?>
|
||||
<?php js::set('changeExecutionConfirmed', false);?>
|
||||
<?php js::set('newRowCount', count($task->team) < 6 ? 6 - count($task->team) : 1);?>
|
||||
@@ -127,7 +130,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->assignedTo;?></th>
|
||||
<?php $disableAssignedTo = (!empty($task->team) and $task->assignedTo != $this->app->user->account) ? "disabled='disabled'" :'';?>
|
||||
<?php $disableAssignedTo = (!empty($task->team) and (($task->assignedTo != $this->app->user->account and $task->mode == 'linear') or !isset($task->team[$app->user->account]))) ? "disabled='disabled'" :'';?>
|
||||
<?php
|
||||
$taskMembers = array();
|
||||
if(!empty($task->team))
|
||||
@@ -146,6 +149,11 @@
|
||||
?>
|
||||
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $taskMembers, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></span></td>
|
||||
</tr>
|
||||
<tr class="modeBox <?php echo $task->mode ? '' : 'hidden';?>">
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<?php $disabledMode = isset($task->team[$app->user->account]) ? '' : "disabled='disabled'"?>
|
||||
<td><?php echo html::select('mode', $lang->task->modeList, $task->mode, "class='form-control chosen' $disabledMode onchange='updateAssignedTo()'");?></td>
|
||||
</tr>
|
||||
<tr class='<?php echo empty($task->team) ? 'hidden' : ''?>' id='teamTr'>
|
||||
<th><?php echo $lang->task->team;?></th>
|
||||
<td><?php echo html::a('#modalTeam', $lang->task->team, '', "class='form-control btn' data-toggle='modal'");?></td>
|
||||
|
||||
@@ -15,11 +15,15 @@
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->finish);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->finish);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -14,11 +14,15 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->pause);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->pause);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -71,14 +71,18 @@
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->logEfforts);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -18,12 +18,16 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<?php
|
||||
/* IF it is multi-task, the suspened can only be restarted by the current user who it is assigned to. */
|
||||
if(!empty($task->team) && $task->assignedTo != $this->app->user->account):
|
||||
if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):
|
||||
?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->start);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->start);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -268,6 +268,12 @@
|
||||
<th><?php echo $lang->task->assignedTo;?></th>
|
||||
<td><?php echo $task->assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : $lang->noData;?></td>
|
||||
</tr>
|
||||
<?php if($task->mode):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<td><?php echo zget($lang->task->modeList, $task->mode);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->type;?></th>
|
||||
<td><?php echo $lang->task->typeList[$task->type];?></td>
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
.table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;}
|
||||
.c-name {min-width: 120px;}
|
||||
.c-branch {width: 120px;}
|
||||
.c-line-number {width: 50px;}
|
||||
.c-id {width: 40px;}
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</thead>
|
||||
<?php foreach($lang->bug->priList as $key => $value):?>
|
||||
<tr class='text-center'>
|
||||
<td class='chart-color c-icon'><i class="chart-color-dot pri-<?php echo $key;?>"></i> <?php echo $key == 0 ? $lang->null : $value;?></td>
|
||||
<td class='chart-color c-icon'><i class="chart-color-dot pri-<?php echo $key;?>"></i> <?php echo $key == 0 ? $lang->null : $value;?></td>
|
||||
<td class='chart-value'><?php echo $infoValue[$key]['generated'];?></td>
|
||||
<td class='chart-value'><?php echo $infoValue[$key]['legacy'];?></td>
|
||||
<td class='chart-value'><?php echo $infoValue[$key]['resolved'];?></td>
|
||||
@@ -202,6 +202,7 @@
|
||||
<?php js::set('bugStageGroups', $bugInfo['bugStageGroups']);?>
|
||||
<?php js::set('bugHandleGroups', $bugInfo['bugHandleGroups']);?>
|
||||
<?php js::set('dateGroups', !empty($bugInfo['bugHandleGroups']) ? array_keys($bugInfo['bugHandleGroups']['generated']) : '');?>
|
||||
<?php js::set('priColorList', $config->bug->colorList->pri);?>
|
||||
<script>
|
||||
var priList = [];
|
||||
var stageList = [];
|
||||
@@ -209,16 +210,16 @@ var colorList = ['#d5d9df', '#d50000', '#ff9800', '#2098ee', '#009688'];
|
||||
var colorKey = 0;
|
||||
for(var key in bugPriList)
|
||||
{
|
||||
$('.pri-' + key).css('background', colorList[colorKey]);
|
||||
var currentColor = colorKey <= 7 ? priColorList[colorKey] : '#C0C0C0';
|
||||
$('.pri-' + key).css('background', currentColor);
|
||||
var priName = key == 0 ? zeroPri : bugPriList[key];
|
||||
var pri = {
|
||||
label: priName,
|
||||
color: colorList[colorKey],
|
||||
color: currentColor,
|
||||
data: [bugStageGroups[key]['generated'], bugStageGroups[key]['legacy'], bugStageGroups[key]['resolved']]
|
||||
}
|
||||
priList.push(pri);
|
||||
colorKey++;
|
||||
if(colorKey >= 5) colorKey -= 5;
|
||||
}
|
||||
var data = {
|
||||
labels: bugStageValueList,
|
||||
|
||||
Reference in New Issue
Block a user