Merge branch 'sprint/tianshujie_bug16101' into 'master'

Sprint/tianshujie bug16101

See merge request easycorp/zentaopms!2612
This commit is contained in:
李玉春
2022-03-29 07:47:51 +00:00
7 changed files with 23 additions and 15 deletions
+6 -1
View File
@@ -1230,6 +1230,8 @@ class execution extends control
*/
public function team($executionID = 0)
{
$this->app->session->set('teamList', $this->app->getURI(true), 'execution');
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1976,6 +1978,8 @@ class execution extends control
*/
public function view($executionID)
{
$this->app->session->set('teamList', $this->app->getURI(true), 'execution');
$executionID = $this->execution->saveState((int)$executionID, $this->executions);
$execution = $this->execution->getById($executionID, true);
$type = $this->config->vision == 'lite' ? 'kanban' : 'stage,sprint,kanban';
@@ -2639,7 +2643,8 @@ class execution extends control
{
$this->execution->manageMembers($executionID);
$this->loadModel('action')->create('team', $executionID, 'managedTeam');
return print(js::locate($this->createLink('execution', 'team', "executionID=$executionID"), 'parent'));
$link = $this->session->teamList ? $this->session->teamList : $this->createLink('execution', 'team', "executionID=$executionID");
return print(js::locate($link, 'parent'));
}
/* Load model. */
-2
View File
@@ -94,7 +94,6 @@
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->RD);?> <span class="text-muted">(<?php echo $lang->execution->RD;?>)</span></div>
<?php endif;?>
<?php if(common::hasPriv('execution', 'team')):?>
<?php foreach($teamMembers as $teamMember):?>
<?php if($j > $i) break;?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $teamMember->account);?></div>
@@ -103,7 +102,6 @@
<div class="col-xs-6">
<?php if($canBeChanged) common::printLink('execution', 'manageMembers', "executionID=$execution->id", "<i class='icon icon-plus hl-primary text-primary'></i> &nbsp;" . $lang->execution->manageMembers, '', "class='text-muted'");?>
</div>
<?php endif;?>
</div>
</div>
</div>
+5 -5
View File
@@ -119,15 +119,15 @@
</div>
<?php endif;?>
<?php $class = $program->model == 'kanban' ? 'disabled' : '';?>
<?php common::printIcon('project', 'edit', "projectID=$program->id", $program, 'list', 'edit', '', 'iframe', true, '', '', $program->id);?>
<?php common::printIcon('project', 'manageMembers', "projectID=$program->id", $program, 'list', 'group', '', "$class", '', 'data-app="project"', '', $program->id);?>
<?php common::printIcon('project', 'group', "projectID=$program->id", $program, 'list', 'lock', '', "$class", '', 'data-app="project"', '', $program->id);?>
<?php common::printIcon('project', 'edit', "projectID=$program->id", $program, 'list', 'edit', '', 'iframe', true);?>
<?php common::printIcon('project', 'team', "projectID=$program->id", $program, 'list', 'group', '', "$class", '', 'data-app="project"');?>
<?php common::printIcon('project', 'group', "projectID=$program->id", $program, 'list', 'lock', '', "$class", '', 'data-app="project"');?>
<?php if(common::hasPriv('project', 'manageProducts') || common::hasPriv('project', 'whitelist') || common::hasPriv('project', 'delete')):?>
<div class='btn-group'>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>"><i class='icon-more-alt'></i></button>
<ul class='dropdown-menu pull-right text-center' role='menu'>
<?php common::printIcon('project', 'manageProducts', "projectID=$program->id&from=browse", $program, 'list', 'link', '', "$class", '', "data-app='project'", '', $program->id);?>
<?php common::printIcon('project', 'whitelist', "projectID=$program->id&module=project&from=browse", $program, 'list', 'shield-check', '', "$class", '', "data-app='project'", '', $program->id);?>
<?php common::printIcon('project', 'manageProducts', "projectID=$program->id&from=browse", $program, 'list', 'link', '', "$class", '', "data-app='project'");?>
<?php common::printIcon('project', 'whitelist', "projectID=$program->id&module=project&from=browse", $program, 'list', 'shield-check', '', "$class", '', "data-app='project'");?>
<?php if(common::hasPriv('project','delete')) echo html::a($this->createLink("project", "delete", "projectID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->delete}' data-group='program'");?>
</ul>
</div>
+5 -1
View File
@@ -718,6 +718,8 @@ class project extends control
{
if(!defined('RUN_MODE') || RUN_MODE != 'api') $projectID = $this->project->saveState((int)$projectID, $this->project->getPairsByProgram());
$this->session->set('teamList', $this->app->getURI(true), 'project');
$project = $this->project->getById($projectID);
if(empty($project) || strpos('scrum,waterfall,kanban', $project->model) === false)
{
@@ -1282,6 +1284,8 @@ class project extends control
*/
public function team($projectID = 0)
{
$this->session->set('teamList', $this->app->getURI(true), 'project');
$this->app->loadLang('execution');
$this->project->setMenu($projectID);
@@ -1358,7 +1362,7 @@ class project extends control
$this->loadModel('action')->create('team', $projectID, 'ManagedTeam');
$link = $this->createLink('project', 'team', "projectID=$projectID");
$link = $this->session->teamList ? $this->session->teamList : $this->createLink('project', 'team', "projectID=$projectID");
return $this->send(array('message' => $this->lang->saveSuccess, 'result' => 'success', 'locate' => $link));
}
+2 -2
View File
@@ -1761,7 +1761,7 @@ class projectModel extends model
if($this->config->vision != 'lite')
{
common::printIcon($moduleName, 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', $dataApp . $attr, $this->lang->execution->team);
common::printIcon($moduleName, 'team', "projectID=$project->id", $project, 'list', 'group', '', '', '', $dataApp . $attr, $this->lang->execution->team);
if($this->config->systemMode == 'new') common::printIcon('project', 'group', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', $dataApp . $attr);
if(common::hasPriv($moduleName, 'manageProducts') || common::hasPriv($moduleName, 'whitelist') || common::hasPriv($moduleName, 'delete'))
@@ -1778,7 +1778,7 @@ class projectModel extends model
}
else
{
common::printIcon($moduleName, 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', $dataApp, $this->lang->execution->team);
common::printIcon($moduleName, 'team', "projectID=$project->id", $project, 'list', 'group', '', '', '', $dataApp, $this->lang->execution->team);
if($this->config->systemMode == 'new') common::printIcon('project', 'whitelist', "projectID=$project->id&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', $dataApp);
if(common::hasPriv($moduleName, 'delete')) echo html::a(helper::createLink($moduleName, "delete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->project->delete}'");
}
+2 -2
View File
@@ -1406,8 +1406,8 @@ class testtask extends control
$this->app->rawModule = 'testcase';
$projectID = $this->app->tab == 'qa' ? 0 : $this->session->project;
$executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 0, 'notrunk');
$executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, '', 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk');
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->importUnitResult;
$this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]);
+3 -2
View File
@@ -95,9 +95,10 @@ function loadExecutionRelated(executionID)
*/
function loadExecutionBuilds(executionID, selected)
{
selectedBuild = $('#build').val();
var selectedBuild = $('#build').val();
if(!selectedBuild) selectedBuild = 0;
link = createLink('build', 'ajaxGetExecutionBuilds', 'executionID=' + executionID + '&productID=' + $('#product').val() + '&varName=testTaskBuild&build=' + selectedBuild, '', '', executionID);
var link = createLink('build', 'ajaxGetExecutionBuilds', 'executionID=' + executionID + '&productID=' + $('#product').val() + '&varName=testTaskBuild&build=' + selectedBuild);
if(executionID == 0) link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + $('#product').val() + '&varName=resolvedBuild&build=' + selectedBuild);
$('#buildBox').load(link, function()
{