Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/285

This commit is contained in:
guofeilong
2023-02-02 14:50:15 +08:00
22 changed files with 64 additions and 35 deletions
@@ -44,7 +44,7 @@ class myExecution extends execution
$TRActions .= "<ul id='kanbanActionMenu' class='dropdown-menu pull-right'>";
$width = $this->app->getClientLang() == 'en' ? '750' : '650';
if(common::hasPriv('kanban', 'createRegion')) $TRActions .= '<li>' . html::a(helper::createLink('kanban', 'createRegion', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createRegion, '', "class='iframe btn btn-link text-left'") . '</li>';
if(common::hasPriv('kanban', 'setLaneHeight')) $TRActions .= '<li>' . html::a(helper::createLink('kanban', 'setLaneHeight', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-size-height"></i>' . $this->lang->kanban->laneHeight, '', "class='iframe btn btn-link text-left' data-width=$width") . '</li>';
if(common::hasPriv('execution', 'setKanban')) $TRActions .= '<li>' . html::a(helper::createLink('execution', 'setKanban', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-size-height"></i>' . $this->lang->kanban->laneHeight, '', "class='iframe btn btn-link text-left' data-width=$width") . '</li>';
$kanbanActions = '';
if(common::hasPriv('execution', 'edit')) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'edit', "executionID=$execution->id", '', true), '<i class="icon icon-edit"></i>' . $this->lang->kanban->edit, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(in_array('start', $executionActions)) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'start', "executionID=$execution->id", '', true), '<i class="icon icon-play"></i>' . $this->lang->execution->start, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
@@ -1,4 +1,9 @@
<?php
$config->project->list->exportFields = 'id,code,name,status,PM,desc';
$config->project->datatable->defaultField = array('id', 'name', 'status', 'PM', 'begin', 'end', 'progress', 'actions');
unset($config->project->datatable->fieldList['budget']);
unset($config->project->search['fields']['hasProduct']);
unset($config->project->search['fields']['parent']);
unset($config->project->search['fields']['model']);
@@ -14,6 +14,7 @@
<?php include $this->app->getModuleRoot() . '/common/view/datepicker.html.php';?>
<?php js::set('taskConsumed', $taskConsumed);?>
<?php js::set('addChildTask', $lang->task->addChildTask);?>
<?php js::set('isonlybody', isonlybody())?>
<?php js::set('regionID', $regionID);?>
<style>.c-lane,.c-region{width:150px;}</style>
<div id="mainContent" class="main-content fade">
+1 -1
View File
@@ -103,7 +103,7 @@
<tr>
<th><?php echo $lang->task->story;?></th>
<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&_single"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
<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&_single"), $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', $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>
+1 -1
View File
@@ -481,7 +481,7 @@ class actionModel extends model
$name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = common::hasPriv('testtask', 'view') ? html::a(helper::createLink('testtask', 'view', "taskID=$action->extra"), $name) : $name;
}
elseif($action->objectType != 'feedback' and $actionName == 'tostory')
elseif(strpos('feedback,ticket', $action->objectType) === false and $actionName == 'tostory')
{
$title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title');
if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title;
+1
View File
@@ -2522,6 +2522,7 @@ EOD;
($module == 'file' and strpos('|read|download|uploadimages|ajaxwopifiles|', "|{$method}|") !== false) or
($module == 'report' && $method == 'annualdata') or
($module == 'misc' && $method == 'captcha') or
($module == 'bug' && $method == 'create') or
($module == 'execution' and $method == 'printkanban') or
($module == 'traincourse' and $method == 'ajaxuploadlargefile') or
($module == 'traincourse' and $method == 'playvideo'))
+1 -1
View File
@@ -3,7 +3,7 @@ $maxUploadSize = strtoupper(ini_get('upload_max_filesize'));
js::set('dangerExtensions', ',' . $this->config->file->dangers . ',');
js::set('maxUploadSize', $maxUploadSize);
?>
<div class="file-input-list" data-append-way="before" data-filedName="<?php echo $filesName;?>" data-provide="fileInputList" data-each-file-max-size="<?php echo $maxUploadSize; ?>" data-file-size-error="<?php echo sprintf($lang->file->errorFileSize, $maxUploadSize); ?>">
<div class="file-input-list" data-append-way="before" data-filedName="<?php echo $filesName;?>" name="<?php echo $filesName;?>[]" data-provide="fileInputList" data-each-file-max-size="<?php echo $maxUploadSize; ?>" data-file-size-error="<?php echo sprintf($lang->file->errorFileSize, $maxUploadSize); ?>">
<div class="file-input">
<div class="file-input-edit input-group">
<div class="input-group-cell"><i class="icon icon-paper-clip text-muted"></i></div>
+2 -2
View File
@@ -270,7 +270,7 @@ class story extends control
else
{
$sessionStoryList = $this->session->storyList;
if(count($_POST['branches']) > 1) $sessionStoryList = preg_replace('/branch=(\d+|[A-Za-z]+)/', 'branch=all', $this->session->storyList);
if(!empty($_POST['branches']) and count($_POST['branches']) > 1) $sessionStoryList = preg_replace('/branch=(\d+|[A-Za-z]+)/', 'branch=all', $this->session->storyList);
$response['locate'] = $sessionStoryList;
}
}
@@ -476,7 +476,7 @@ class story extends control
$this->view->URS = $storyType == 'story' ? $this->story->getProductStoryPairs($productID, $branch, $moduleIdList, 'changing,active,reviewing', 'id_desc', 0, '', 'requirement') : '';
$this->view->needReview = ($this->app->user->account == $product->PO or $objectID > 0 or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) ? "checked='checked'" : "";
$this->view->type = $storyType;
$this->view->category = $category ? $category : 'feature';
$this->view->category = !empty($category) ? $category : 'feature';
$this->display();
}
+8 -8
View File
@@ -449,7 +449,7 @@ $lang->story->chosen->reviewedBy = '选择评审人...';
$lang->story->notice = new stdClass();
$lang->story->notice->closed = "您选择的{$lang->SRCommon}已经被关闭了!";
$lang->story->notice->reviewerNotEmpty = '该需求需要评审,评审人员不能为空。';
$lang->story->notice->reviewerNotEmpty = "该{$lang->SRCommon}需要评审,评审人员不能为空。";
$lang->story->notice->changePlan = '所属计划只能改为一条,修改后才能保存成功。';
$lang->story->convertToTask = new stdClass();
@@ -468,20 +468,20 @@ $lang->story->categoryList['experience'] = '体验';
$lang->story->categoryList['improve'] = '改进';
$lang->story->categoryList['other'] = '其他';
$lang->story->changeTip = '只有激活状态的需求,才能进行变更';
$lang->story->changeTip = "只有激活状态的{$lang->SRCommon},才能进行变更";
$lang->story->reviewTip = array();
$lang->story->reviewTip['active'] = '该需求已是激活状态,无需评审';
$lang->story->reviewTip['notReviewer'] = '您不是该需求的评审人员,无法进行评审操作';
$lang->story->reviewTip['active'] = "该{$lang->SRCommon}已是激活状态,无需评审";
$lang->story->reviewTip['notReviewer'] = "您不是该{$lang->SRCommon}的评审人员,无法进行评审操作";
$lang->story->reviewTip['reviewed'] = '您已评审';
$lang->story->recallTip = array();
$lang->story->recallTip['actived'] = '该需求未发起评审流程,无需撤销操作';
$lang->story->recallTip['actived'] = "该{$lang->SRCommon}未发起评审流程,无需撤销操作";
$lang->story->subDivideTip = array();
$lang->story->subDivideTip['subStory'] = '子需求无法细分';
$lang->story->subDivideTip['notWait'] = '该需求%s,无法进行细分操作';
$lang->story->subDivideTip['notActive'] = '需求不是激活状态,无法进行细分操作';
$lang->story->subDivideTip['subStory'] = "子{$lang->SRCommon}无法细分";
$lang->story->subDivideTip['notWait'] = "该{$lang->SRCommon}%s,无法进行细分操作";
$lang->story->subDivideTip['notActive'] = "{$lang->SRCommon}不是激活状态,无法进行细分操作";
$lang->story->subDivideTip['twinsSplit'] = '孪生需求不可细分';
$lang->story->featureBar['browse']['all'] = '全部';
+3 -2
View File
@@ -906,11 +906,12 @@ class storyModel extends model
return false;
}
$storyPlan = !empty($_POST['plan']) ? array_filter($_POST['plan']) : array();
$storyPlan = array();
if(!empty($_POST['plan'])) $storyPlan = is_array($_POST['plan']) ? array_filter($_POST['plan']) : array($_POST['plan']);
if(count($storyPlan) > 1)
{
$oldStoryPlan = !empty($oldStory->planTitle) ? array_keys($oldStory->planTitle) : array();
if(!empty(array_diff($storyPlan,$oldStoryPlan)) or !empty(array_diff($oldStoryPlan,$storyPlan)))
if(!empty(array_diff($storyPlan, $oldStoryPlan)) or !empty(array_diff($oldStoryPlan, $storyPlan)))
{
dao::$errors[] = $this->lang->story->notice->changePlan;
return false;
+1 -1
View File
@@ -198,7 +198,7 @@ $config->task->datatable->fieldList['story']['width'] = '80';
$config->task->datatable->fieldList['story']['required'] = 'no';
$config->task->datatable->fieldList['story']['name'] = $lang->task->story;
$config->task->datatable->fieldList['story']['control'] = 'select';
$config->task->datatable->fieldList['story']['dataSource'] = array('module' => 'story', 'method' => 'getExecutionStories', 'params' => '$executionID', 'pairs' => array('id', 'title'));
$config->task->datatable->fieldList['story']['dataSource'] = array('module' => 'story', 'method' => 'getExecutionStoryPairs', 'params' => '$executionID&0&all&&&active');
$config->task->datatable->fieldList['mailto']['title'] = 'mailto';
$config->task->datatable->fieldList['mailto']['fixed'] = 'no';
+16
View File
@@ -2852,6 +2852,22 @@ class taskModel extends model
->fetchAll();
}
/**
* Get taskList date record.
*
* @param int|array $taskID
* @access public
* @return array
*/
public function getTaskDateRecord($taskID)
{
return $this->dao->select('id,date')->from(TABLE_EFFORT)->where('objectID')->in($taskID)
->andWhere('objectType')->eq('task')
->andWhere('deleted')->eq('0')
->orderBy('date')
->fetchAll('id');
}
/**
* Get estimate by id.
*
+1 -1
View File
@@ -38,7 +38,7 @@ function createBug(obj)
}
else
{
window.open(link, '_parent');
window.open(link, '_blank');
}
config.onlybody = onlybody;
}
+6 -1
View File
@@ -7576,7 +7576,12 @@ class upgradeModel extends model
$project->lastEditedDate = $now;
$project->grade = 2;
$project->acl = $sprint->acl == 'open' ? 'open' : 'private';
if($fromMode == 'classic') $project->multiple = '0';
if($fromMode == 'classic')
{
$project->multiple = '0';
$project->code = $sprint->code;
$project->team = $sprint->team;
}
$this->dao->insert(TABLE_PROJECT)->data($project)->exec();
if(dao::isError()) return false;
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long