* Finish task #44361.
This commit is contained in:
@@ -40,7 +40,7 @@ class execution extends control
|
||||
|
||||
$this->loadModel('project');
|
||||
|
||||
if(IN_UPGRADE) return false;
|
||||
if(defined('IN_UPGRADE') and IN_UPGRADE) return false;
|
||||
$this->executions = $this->execution->getPairs(0, 'all', 'nocode');
|
||||
$skipCreateStep = array('computeburn', 'ajaxgetdropmenu', 'executionkanban', 'ajaxgetteammembers');
|
||||
if(!in_array($this->methodName, $skipCreateStep) and $this->app->tab == 'execution')
|
||||
|
||||
@@ -35,7 +35,10 @@ div.divider {vertical-align: middle;}
|
||||
.programParams td > label:first-child {margin-right: 10px;}
|
||||
.programParams td > label:last-child {margin-left: 0px;}
|
||||
|
||||
.lineGroup .sprintRename input {max-width: 120px;}
|
||||
.projectList .scroll-handle .checkbox-primary {display: inline-block;}
|
||||
.sprintRename {margin-top: 5px;}
|
||||
.sprintRename input {display: inline-block; width: auto;}
|
||||
.sprintRename .btn-group {display: inline-block;}
|
||||
.sprintGroup .sprintItem .checkbox-primary {display: inline-block;}
|
||||
|
||||
|
||||
@@ -4416,7 +4416,20 @@ class upgradeModel extends model
|
||||
else
|
||||
{
|
||||
/* Use historical projects as project upgrades. */
|
||||
|
||||
$projects = $this->dao->select('id,name,begin,end,status,PM,acl')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
|
||||
|
||||
$hasExistedProjects = $this->dao->select('name')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchPairs('name');
|
||||
|
||||
$nameList = array();
|
||||
foreach($projectIdList as $projectID)
|
||||
{
|
||||
$projectName = $projects[$projectID]->name;
|
||||
if(isset($hasExistedProjects[$projectName]) or isset($nameList[$projectName])) dao::$errors['name'][] = 'project#' . $projectID . sprintf($this->lang->error->unique, $this->lang->project->name, $projectName);
|
||||
$nameList[$projectName] = $projectName;
|
||||
}
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
foreach($projectIdList as $projectID)
|
||||
{
|
||||
$data->projectName = $projects[$projectID]->name;
|
||||
|
||||
@@ -52,8 +52,18 @@
|
||||
<div class='scroll-handle'>
|
||||
<?php if(isset($productGroups[$productID])):?>
|
||||
<?php foreach($productGroups[$productID] as $sprint):?>
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => $sprint->name), '', "title='{$sprint->name}' data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}' class='tile'");?>
|
||||
<?php echo html::hidden("sprintIdList[$line->id][$productID][$sprint->id]", $sprint->id);?>
|
||||
<div class="sprintItem">
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => $sprint->name), '', "title='{$sprint->name}' data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}' class='tile'");?>
|
||||
<?php echo html::hidden("sprintIdList[$line->id][$productID][$sprint->id]", $sprint->id);?>
|
||||
<a href='#' id='sprintEdit' class='hidden'><i class="icon-common-edit icon-edit muted"></i></a>
|
||||
</div>
|
||||
<div class="sprintRename hidden">
|
||||
<?php echo html::input("sprintRename_$sprint->id", $sprint->name, "class='form-control'");?>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success name-confirm"><i class='icon icon-check'></i></button>
|
||||
<button type="button" class="btn btn-gray name-cancel"><i class='icon icon-close'></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,17 @@
|
||||
</div>
|
||||
<div class='line-groups sprintGroup'>
|
||||
<?php foreach($noMergedSprints as $sprintID => $sprint):?>
|
||||
<?php echo html::checkBox("sprints", array($sprint->id => $sprint->name), '', "data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<div class="sprintItem">
|
||||
<?php echo html::checkBox("sprints", array($sprint->id => $sprint->name), '', "data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<a href='#' id='sprintEdit' class='hidden'><i class="icon-common-edit icon-edit muted"></i></a>
|
||||
</div>
|
||||
<div class="sprintRename hidden">
|
||||
<?php echo html::input("sprintRename_$sprint->id", $sprint->name, "class='form-control'");?>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success name-confirm"><i class='icon icon-check'></i></button>
|
||||
<button type="button" class="btn btn-gray name-cancel"><i class='icon icon-close'></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user