* Fix bug.
This commit is contained in:
@@ -16,7 +16,7 @@ $app->loadLang('task');
|
||||
$config->execution->task = new stdclass();
|
||||
$config->execution->create = new stdclass();
|
||||
$config->execution->edit = new stdclass();
|
||||
$config->execution->create->requiredFields = 'project,name,code,begin,end';
|
||||
$config->execution->create->requiredFields = 'name,code,begin,end';
|
||||
$config->execution->edit->requiredFields = 'name,code,begin,end';
|
||||
|
||||
$config->execution->customBatchEditFields = 'days,type,teamname,status,desc,PO,QD,PM,RD';
|
||||
|
||||
@@ -280,15 +280,20 @@ class executionModel extends model
|
||||
{
|
||||
$this->lang->execution->team = $this->lang->execution->teamname;
|
||||
|
||||
if(empty($_POST['project']))
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->execution->projectNotEmpty;
|
||||
return false;
|
||||
}
|
||||
if(empty($_POST['project']))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->execution->projectNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Determine whether to add a sprint or a stage according to the model of the execution. */
|
||||
$project = $this->getByID($_POST['project']);
|
||||
$sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $project->model, '') : 'sprint';
|
||||
/* Determine whether to add a sprint or a stage according to the model of the execution. */
|
||||
$project = $this->getByID($_POST['project']);
|
||||
$sprintType = zget($this->config->execution->modelList, $project->model, 'sprint');
|
||||
|
||||
$this->config->execution->create->requiredFields .= ',project';
|
||||
}
|
||||
|
||||
/* If the execution model is a stage, determine whether the product is linked. */
|
||||
if($sprintType == 'stage' and empty($this->post->products[0]))
|
||||
|
||||
@@ -45,11 +45,13 @@
|
||||
</div>
|
||||
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->execution->project;?></th>
|
||||
<td class="col-main"><?php echo html::select("project", $allProjects, $projectID, "class='form-control chosen' required onchange='refreshPage(this.value)'");?></td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $from == 'execution' ? $lang->execution->execName : $lang->execution->name;?></th>
|
||||
<td class="col-main"><?php echo html::input('name', $name, "class='form-control' required");?></td>
|
||||
|
||||
@@ -4302,7 +4302,7 @@ class upgradeModel extends model
|
||||
$data->path = ",{$projectID},{$sprint->id},";
|
||||
$data->type = 'sprint';
|
||||
$data->acl = $sprint->acl == 'custom' ? 'private' : $sprint->acl;
|
||||
$data->lifetime = $sprint->type;
|
||||
$data->lifetime = empty($sprint->lifetime) ? $sprint->type : $sprint->lifetime;
|
||||
|
||||
$this->dao->update(TABLE_PROJECT)->data($data)->where('id')->eq($sprint->id)->exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user