Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
z
2020-08-10 09:30:23 +08:00
27 changed files with 62 additions and 34 deletions
+1
View File
@@ -0,0 +1 @@
update zt_action set `project` = `extra` where action = 'unlinkedfromproject' and `project` = 0;
+1
View File
@@ -1079,6 +1079,7 @@ class actionModel extends model
*
* @param array $actions
* @param string $direction
* @param string $type
* @access public
* @return array
*/
+5 -1
View File
@@ -195,7 +195,11 @@ js::set('flow', $config->global->flow);
}
$priList = $lang->bug->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri])) $pri = reset($priList);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
+5 -1
View File
@@ -91,7 +91,11 @@
}
$priList = $lang->testcase->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri])) $pri = reset($priList);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
-1
View File
@@ -17,4 +17,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
-1
View File
@@ -18,4 +18,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
-1
View File
@@ -19,4 +19,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
+2 -2
View File
@@ -266,8 +266,8 @@ class productplan extends control
$this->commonAction($plan->product, $plan->branch);
$products = $this->product->getPairs();
$bugPager = new pager($type == 'bug' ? $recTotal : 0, $recPerPage, $type == 'bug' ? $pageID : 1);
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
$bugPager = new pager(0, $recPerPage, $type == 'bug' ? $pageID : 1);
$storyPager = new pager(0, $recPerPage, $type == 'story' ? $pageID : 1);
$planStories = $this->loadModel('story')->getPlanStories($planID, 'all', $type == 'story' ? $sort : 'id_desc', $storyPager);
if($reSort)
{
-1
View File
@@ -19,4 +19,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
+3 -3
View File
@@ -143,13 +143,13 @@ js::set('foldAll', $lang->project->treeLevel['root']);
$link = $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
if(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'");
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "&storyID=0&moduleID=''"));
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
?>
<?php else:?>
<?php
echo "<div class='btn-group dropdown-hover'>";
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "&storyID=0&moduleID=''"));
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create} </span><span class='caret'>", '', "class='btn btn-primary'");
?>
<ul class='dropdown-menu'>
@@ -183,7 +183,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<p>
<span class="text-muted"><?php echo $lang->task->noTask;?></span>
<?php if(common::hasPriv('task', 'create', $checkObject)):?>
<?php echo html::a($this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')), "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "&storyID=0&moduleID=''")), "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
+1 -1
View File
@@ -548,7 +548,7 @@ class repo extends control
if(isset($pathInfo["extension"])) $suffix = strtolower($pathInfo["extension"]);
$arrange = $this->cookie->arrange ? $this->cookie->arrange : 'inline';
if(!empty($_POST))
if($this->server->request_method)
{
$oldRevision = isset($this->post->revision[1]) ?$this->post->revision[1] : '';
$newRevision = isset($this->post->revision[0]) ?$this->post->revision[0] : '';
@@ -50,7 +50,6 @@ if(isset($entry)) $pathInfo .= '&type=file';
</tbody>
</table>
<div class='table-footer'>
<?php echo html::hidden('isPost', true);?>
<?php if(common::hasPriv('repo', 'diff')) echo html::submitButton($lang->repo->diff, '', count($revisions) < 2 ? 'disabled btn btn-primary' : 'btn btn-primary')?>
<?php echo html::a($this->repo->createLink('log', "repoID=$repoID&entry=&revision=HEAD&type=$logType", "entry=" . $this->repo->encodePath($path)), $lang->repo->allLog, '', "class='allLogs'");?>
<div class='pull-right'>
+1 -4
View File
@@ -82,10 +82,7 @@
</tbody>
</table>
<div class='table-footer'>
<?php
echo html::hidden('isPost', true);
echo html::submitButton($lang->repo->diff, '', 'btn btn-primary');
?>
<?php echo html::submitButton($lang->repo->diff, '', 'btn btn-primary')?>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
+1 -1
View File
@@ -225,7 +225,7 @@ $lang->story->errorNotSubdivide = "If the status is not active, or the stage
$lang->story->mustChooseResult = 'Ergebnis wählen';
$lang->story->mustChoosePreVersion = 'Version wählen um es umzukhren.';
$lang->story->noStory = 'Keine Storys. ';
$lang->story->ignoreChangeStage = 'Story %s is a draft. Please review it..';
$lang->story->ignoreChangeStage = 'Story %s is in Draft or Closed status. Please review it..';
$lang->story->cannotDeleteParent = "Can not delete parent {$lang->storyCommon}";
$lang->story->moveChildrenTips = "Its Child {$lang->storyCommon} will be moved to the selected product when editing the linked product of Parent {$lang->storyCommon}.";
+1 -1
View File
@@ -225,7 +225,7 @@ $lang->story->errorNotSubdivide = "If the status is not active, or the stage
$lang->story->mustChooseResult = 'Select Result';
$lang->story->mustChoosePreVersion = 'Select a version to revert to.';
$lang->story->noStory = 'No stories yet. ';
$lang->story->ignoreChangeStage = 'Story %s is a draft. Please review it..';
$lang->story->ignoreChangeStage = 'Story %s is in Draft or Closed status. Please review it..';
$lang->story->cannotDeleteParent = "Can not delete parent {$lang->storyCommon}";
$lang->story->moveChildrenTips = "Its Child {$lang->storyCommon} will be moved to the selected product when editing the linked product of Parent {$lang->storyCommon}.";
+1 -1
View File
@@ -225,7 +225,7 @@ $lang->story->errorNotSubdivide = "状态不是激活,或者阶段不是
$lang->story->mustChooseResult = '必须选择评审结果';
$lang->story->mustChoosePreVersion = '必须选择回溯的版本';
$lang->story->noStory = "暂时没有{$lang->storyCommon}。";
$lang->story->ignoreChangeStage = "{$lang->storyCommon} %s 为草稿状态,没有修改其阶段。";
$lang->story->ignoreChangeStage = "{$lang->storyCommon} %s 为草稿状态或已关闭状态,没有修改其阶段。";
$lang->story->cannotDeleteParent = "不能删除父{$lang->storyCommon}";
$lang->story->moveChildrenTips = "修改父{$lang->storyCommon}的所属产品会将其下的子{$lang->storyCommon}也移动到所选产品下。";
+1 -1
View File
@@ -225,7 +225,7 @@ $lang->story->errorNotSubdivide = "狀態不是激活,或者階段不是
$lang->story->mustChooseResult = '必須選擇評審結果';
$lang->story->mustChoosePreVersion = '必須選擇回溯的版本';
$lang->story->noStory = "暫時沒有{$lang->storyCommon}。";
$lang->story->ignoreChangeStage = "{$lang->storyCommon} %s 為草稿狀態,沒有修改其階段。";
$lang->story->ignoreChangeStage = "{$lang->storyCommon} %s 為草稿狀態或已關閉狀態,沒有修改其階段。";
$lang->story->cannotDeleteParent = "不能刪除父{$lang->storyCommon}";
$lang->story->moveChildrenTips = "修改父{$lang->storyCommon}的所屬產品會將其下的子{$lang->storyCommon}也移動到所選產品下。";
+2 -3
View File
@@ -1306,7 +1306,7 @@ class storyModel extends model
foreach($storyIdList as $storyID)
{
$oldStory = $oldStories[$storyID];
if($oldStory->status == 'draft')
if($oldStory->status == 'draft' or $oldStory->status == 'closed')
{
$ignoreStories .= "#{$storyID} ";
continue;
@@ -1320,7 +1320,6 @@ class storyModel extends model
$this->dao->update(TABLE_STORY)->data($story)->autoCheck()->where('id')->eq((int)$storyID)->exec();
$this->dao->update(TABLE_STORYSTAGE)->set('stage')->eq($stage)->set('stagedBy')->eq($account)->where('story')->eq((int)$storyID)->exec();
$this->setStage($storyID);
if(!dao::isError()) $allChanges[$storyID] = common::createChanges($oldStory, $story);
}
if($ignoreStories) echo js::alert(sprintf($this->lang->story->ignoreChangeStage, $ignoreStories));
@@ -2350,7 +2349,7 @@ class storyModel extends model
$moduleNames = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in($modules)->fetchPairs();*/
/* Format these stories. */
$storyPairs = array('' => '');
$storyPairs = array(0 => '');
$i = 0;
foreach($stories as $story)
{
+5 -1
View File
@@ -133,7 +133,11 @@
$priList = $lang->story->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri])) $pri = reset($priList);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
+5 -3
View File
@@ -460,7 +460,7 @@ class task extends control
/* Get edited tasks. */
$tasks = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($taskIDList)->fetchAll('id');
$teams = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in($taskIDList)->andWhere('type')->eq('task')->fetchAll('root');
$teams = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in($taskIDList)->andWhere('type')->eq('task')->fetchGroup('root', 'account');
/* Judge whether the editedTasks is too large and set session. */
$countInputVars = count($tasks) * (count(explode(',', $this->config->task->custom->batchEditFields)) + 3);
@@ -572,18 +572,20 @@ class task extends control
{
if(!empty($_POST))
{
$this->loadModel('action');
$taskIDList = $this->post->taskIDList;
$taskIDList = array_unique($taskIDList);
unset($_POST['taskIDList']);
if(!is_array($taskIDList)) die(js::locate($this->createLink('project', 'task', "projectID=$project"), 'parent'));
$taskIDList = array_unique($taskIDList);
$muletipleTasks = $this->dao->select('root')->from(TABLE_TEAM)->where('type')->eq('task')->andWhere('root')->in($taskIDList)->fetchPairs();
$muletipleTasks = $this->dao->select('root , account')->from(TABLE_TEAM)->where('type')->eq('task')->andWhere('root')->in($taskIDList)->fetchGroup('root', 'account');
$tasks = $this->task->getByList($taskIDList);
$this->loadModel('action');
foreach($tasks as $taskID => $task)
{
if(in_array($taskID, $muletipleTasks) and $task->assignedTo != $this->app->user->account) continue;
if(isset($muletipleTasks[$taskID]) and $task->assignedTo != $this->app->user->account) continue;
if(isset($muletipleTasks[$taskID]) and !isset($muletipleTasks[$taskID][$this->post->assignedTo])) continue;
$changes = $this->task->assign($taskID);
if(dao::isError()) die(js::error(dao::getError()));
+1
View File
@@ -1075,6 +1075,7 @@ class taskModel extends model
foreach($tasks as $taskID => $task)
{
if($task->status == 'done' and $task->consumed == false) die(js::error('task#' . $taskID . sprintf($this->lang->error->notempty, $this->lang->task->consumedThisTime)));
$oldTask = $oldTasks[$taskID];
$this->dao->update(TABLE_TASK)->data($task)
->autoCheck()
+13 -2
View File
@@ -58,7 +58,7 @@
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden') . zget($requiredFields, 'status', '', ' required');?>'><?php echo $lang->task->status;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'record', ' hidden') . zget($requiredFields, 'record', '', ' required');?>'><?php echo $lang->task->consumed;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'record', ' hidden') . zget($requiredFields, 'record', '', ' required');?>'><?php echo $lang->task->consumedThisTime;?></th>
<th class='w-70px<?php echo zget($visibleFields, 'left', ' hidden') . zget($requiredFields, 'left', '', ' required');?>'><?php echo $lang->task->leftAB?></th>
<th class='w-90px<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted?></th>
<th class='w-90px<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline?></th>
@@ -89,6 +89,17 @@
<tr>
<?php $disableAssignedTo = (isset($teams[$taskID]) and $tasks[$taskID]->assignedTo != $this->app->user->account) ? "disabled='disabled'" : '';?>
<?php $disableHour = isset($teams[$taskID]) ? "disabled='disabled'" : '';?>
<?php
if(isset($teams[$taskID]))
{
$taskMembers = array_intersect_key($members, $teams[$taskID]);
$taskMembers = array('' => '', 'ditto' => $this->lang->task->ditto) + $taskMembers;
}
else
{
$taskMembers = $members;
}
?>
<td><?php echo $taskID . html::hidden("taskIDList[$taskID]", $taskID);?></td>
<td style='overflow:visible' title='<?php echo $tasks[$taskID]->name?>'>
<div class="input-control has-icon-right">
@@ -103,7 +114,7 @@
</div>
</td>
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$taskID]", $modules, $tasks[$taskID]->module, "class='form-control chosen'")?></td>
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$taskID]", $members, $tasks[$taskID]->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></td>
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$taskID]", $taskMembers, $tasks[$taskID]->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></td>
<td><?php echo html::select("types[$taskID]", $typeList, $tasks[$taskID]->type, "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$taskID]", $statusList, $tasks[$taskID]->status, "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$taskID]", $priList, $tasks[$taskID]->pri, "class='form-control'");?></td>
+5 -1
View File
@@ -163,7 +163,11 @@
}
$priList = $lang->task->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$task->pri])) $task->pri = reset($priList);
if(!isset($priList[$task->pri]))
{
reset($priList);
$task->pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control'");?>
+2 -1
View File
@@ -122,7 +122,8 @@
<tr>
<th><?php echo $lang->task->assignedTo;?></th>
<?php $disableAssignedTo = (!empty($task->team) and $task->assignedTo != $this->app->user->account) ? "disabled='disabled'" :'';?>
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $members, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></span></td>
<?php $taskMembers = !empty($task->team) ? array_intersect_key($members, $task->team) : $members;?>
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $taskMembers, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></span></td>
</tr>
<tr class='<?php echo empty($task->team) ? 'hidden' : ''?>' id='teamTr'>
<th><?php echo $lang->task->team;?></th>
+5 -1
View File
@@ -108,7 +108,11 @@
}
$priList = $lang->testcase->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri])) $pri = reset($priList);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
-1
View File
@@ -18,4 +18,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
+1
View File
@@ -57,3 +57,4 @@ a.showMoreImage:hover{opacity: 1;}
.color-darkblue{background:rgb(0,0,139)}
.color-darkblue:hover{background:rgb(0,0,139)}
.color-darkblue:focus{background:rgb(0,0,139)}
.margin-l-50px{margin-left:50px;}