* Fix Task #77262
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
<?php ;if(trim($config->visions, ',') == 'lite'): ?>
|
||||
<?php if(trim($config->visions, ',') == 'lite'): ?>
|
||||
$('#headerActions').css("right", '140px');
|
||||
<?php else: ?>
|
||||
$('#headerActions').css("right", '235px');
|
||||
|
||||
@@ -2129,7 +2129,7 @@ class execution extends control
|
||||
}
|
||||
|
||||
/* Set custom. */
|
||||
foreach(explode(',', $this->config->execution->customBatchEditFields) as $field) $customFields[$field] = $this->lang->execution->$field;
|
||||
foreach(explode(',', $this->config->execution->customBatchEditFields) as $field) $customFields[$field] = str_replace($this->lang->executionCommon, $this->lang->execution->common, $this->lang->execution->$field);
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->execution->custom->batchEditFields;
|
||||
|
||||
|
||||
@@ -566,8 +566,8 @@ class executionModel extends model
|
||||
if($oldExecution->type == 'stage' and $field == 'name') $this->lang->project->name = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->project->name);
|
||||
}
|
||||
|
||||
$relationExecutionsID = $this->getRelatedExecutions($executionID);
|
||||
$relationExecutionsID = !empty($relationExecutionsID) ? implode(',', array_keys($relationExecutionsID)) : '';
|
||||
$relatedExecutionsID = $this->getRelatedExecutions($executionID);
|
||||
$relatedExecutionsID = !empty($relatedExecutionsID) ? implode(',', array_keys($relatedExecutionsID)) : '';
|
||||
|
||||
/* Update data. */
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
@@ -578,7 +578,7 @@ class executionModel extends model
|
||||
->checkIF($execution->begin != '', 'begin', 'date')
|
||||
->checkIF($execution->end != '', 'end', 'date')
|
||||
->checkIF($execution->end != '', 'end', 'ge', $execution->begin)
|
||||
->checkIF(!empty($execution->name), 'name', 'unique', "id in ('$relationExecutionsID') and type in ('sprint','stage', 'kanban') and `project` = $executionProject and `deleted` = '0'")
|
||||
->checkIF(!empty($execution->name), 'name', 'unique', "id in ('$relatedExecutionsID') and type in ('sprint','stage', 'kanban') and `project` = $executionProject and `deleted` = '0'")
|
||||
->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `deleted` = '0'")
|
||||
->checkFlow()
|
||||
->where('id')->eq($executionID)
|
||||
|
||||
@@ -1086,15 +1086,15 @@ class programplanModel extends model
|
||||
$this->lang->project->name = $this->lang->programplan->name;
|
||||
$this->lang->project->code = $this->lang->execution->code;
|
||||
|
||||
$relationExecutionsID = $this->loadModel('execution')->getRelatedExecutions($planID);
|
||||
$relationExecutionsID = !empty($relationExecutionsID) ? implode(',', array_keys($relationExecutionsID)) : '';
|
||||
$relatedExecutionsID = $this->loadModel('execution')->getRelatedExecutions($planID);
|
||||
$relatedExecutionsID = !empty($relatedExecutionsID) ? implode(',', array_keys($relatedExecutionsID)) : '';
|
||||
|
||||
$this->dao->update(TABLE_PROJECT)->data($plan)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->programplan->edit->requiredFields, 'notempty')
|
||||
->checkIF($plan->end != '0000-00-00', 'end', 'ge', $plan->begin)
|
||||
->checkIF($plan->percent != false, 'percent', 'float')
|
||||
->checkIF(!empty($plan->name), 'name', 'unique', "id in ('{$relationExecutionsID}') and type in ('sprint','stage') and `project` = {$oldPlan->project} and `deleted` = '0'" . ($parentStage ? " and `parent` = {$oldPlan->parent}" : ''))
|
||||
->checkIF(!empty($plan->name), 'name', 'unique', "id in ('{$relatedExecutionsID}') and type in ('sprint','stage') and `project` = {$oldPlan->project} and `deleted` = '0'" . ($parentStage ? " and `parent` = {$oldPlan->parent}" : ''))
|
||||
->checkIF(!empty($plan->code) and $setCode, 'code', 'unique', "id != $planID and type in ('sprint','stage','kanban') and `deleted` = '0'")
|
||||
->where('id')->eq($planID)
|
||||
->exec();
|
||||
|
||||
@@ -2015,7 +2015,7 @@ class story extends control
|
||||
*/
|
||||
public function batchToTask($executionID = 0, $projectID = 0)
|
||||
{
|
||||
if($executionID) $this->loadModel('execution')->setMenu($executionID);
|
||||
if($this->app->tab == 'execution' and $executionID) $this->loadModel('execution')->setMenu($executionID);
|
||||
|
||||
if(!empty($_POST['name']))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user