Merge branch 'cyy_bug' into 'master'
* Modify edit multi task. See merge request easycorp/zentaopms!5512
This commit is contained in:
@@ -147,10 +147,7 @@ class port extends control
|
||||
{
|
||||
$filter = '';
|
||||
if($model == 'task') $filter = 'estimate';
|
||||
if($model == 'story')
|
||||
{
|
||||
if($this->session->storyType) $this->loadModel('story')->replaceUserRequirementLang();
|
||||
}
|
||||
if($model == 'story' and $this->session->storyType) $this->loadModel('story')->replaceUserRequirementLang();
|
||||
|
||||
$this->loadModel($model);
|
||||
$importFields = !empty($_SESSION[$model . 'TemplateFields']) ? $_SESSION[$model . 'TemplateFields'] : $this->config->$model->templateFields;
|
||||
|
||||
@@ -259,6 +259,8 @@ class portModel extends model
|
||||
foreach($fields as $key => $field)
|
||||
{
|
||||
$field = trim($field);
|
||||
if($model == 'bug' and $this->session->currentProductType == 'normal' and $field == 'branch') continue;
|
||||
|
||||
$modelFieldList = isset($this->modelFieldList[$field]) ? $this->modelFieldList[$field] : array();
|
||||
|
||||
foreach($portFieldList as $portField => $value)
|
||||
@@ -472,9 +474,7 @@ class portModel extends model
|
||||
if(!$tmpFile)
|
||||
{
|
||||
$rows = $this->getRowsFromExcel();
|
||||
|
||||
$modelData = $this->processRows4Fields($rows, $fields);
|
||||
|
||||
$modelData = $this->getNatureDatas($model, $modelData, $filter, $fields);
|
||||
|
||||
$this->createTmpFile($modelData);
|
||||
|
||||
@@ -1184,7 +1184,7 @@ class programModel extends model
|
||||
|
||||
$childGrade = $parentProgram->grade + 1;
|
||||
$childSumBudget = $this->dao->select("sum(budget) as sumBudget")->from(TABLE_PROGRAM)
|
||||
->where('path')->like("%{$parentProgram->id}%")
|
||||
->where('path')->like("%,{$parentProgram->id},%")
|
||||
->andWhere('grade')->eq($childGrade)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->fetch('sumBudget');
|
||||
|
||||
@@ -583,7 +583,7 @@ $('#modalTeam tfoot .btn').click(function()
|
||||
|
||||
estimate = parseFloat($(this).parents('td').next('td').find('[name^=teamEstimate]').val());
|
||||
if(!isNaN(estimate) && estimate > 0) time += estimate;
|
||||
if(account != '' && (isNaN(estimate) || estimate == 0))
|
||||
if(account != '' && (isNaN(estimate) || estimate <= 0))
|
||||
{
|
||||
bootbox.alert(account + ' ' + estimateNotEmpty);
|
||||
error = true;
|
||||
|
||||
@@ -99,7 +99,7 @@ $('#confirmButton').click(function()
|
||||
|
||||
var estimate = parseFloat($tr.find('[name^=teamEstimate]').val());
|
||||
if(!isNaN(estimate)) totalEstimate += estimate;
|
||||
if(isNaN(estimate) || estimate == 0)
|
||||
if(isNaN(estimate) || estimate <= 0)
|
||||
{
|
||||
bootbox.alert(account + ' ' + estimateNotEmpty);
|
||||
error = true;
|
||||
@@ -112,7 +112,7 @@ $('#confirmButton').click(function()
|
||||
var $left = $tr.find('[name^=teamLeft]');
|
||||
var left = parseFloat($left.val());
|
||||
if(!isNaN(left)) totalLeft += left;
|
||||
if(!$left.prop('readonly') && (isNaN(left) || left == 0))
|
||||
if(!$left.prop('readonly') && (isNaN(left) || left <= 0))
|
||||
{
|
||||
bootbox.alert(account + ' ' + leftNotEmpty);
|
||||
error = true;
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
|
||||
<?php js::set('totalLeftError', sprintf($this->lang->task->error->leftEmptyAB, $this->lang->task->statusList[$task->status]));?>
|
||||
<?php js::set('estimateNotEmpty', sprintf($lang->error->notempty, $lang->task->estimate))?>
|
||||
<?php js::set('leftNotEmpty', sprintf($lang->error->notempty, $lang->task->left))?>
|
||||
<?php js::set('estimateNotEmpty', sprintf($lang->error->gt, $lang->task->estimate, '0'))?>
|
||||
<?php js::set('leftNotEmpty', sprintf($lang->error->gt, $lang->task->left, '0'))?>
|
||||
<?php js::set('requiredFields', $config->task->edit->requiredFields);?>
|
||||
<?php
|
||||
$requiredFields = array();
|
||||
|
||||
Reference in New Issue
Block a user