Merge branch 'sprint/tianshujie_fixbug' into 'master'
Sprint/tianshujie fixbug See merge request easycorp/zentaopms!4582
This commit is contained in:
@@ -438,7 +438,7 @@ class task extends control
|
||||
$customFields[$field] = $this->lang->task->$field;
|
||||
}
|
||||
|
||||
if($execution->lifetime == 'ops') unset($customFields['story']);
|
||||
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review') unset($customFields['story']);
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->task->custom->batchCreateFields;
|
||||
|
||||
@@ -6,7 +6,7 @@ $(function()
|
||||
|
||||
var fieldList = showFields + ',';
|
||||
var requiredList = ',' + requiredFields + ',';
|
||||
if(lifetime == 'ops')
|
||||
if(lifetime == 'ops' || (typeof execAttribute != 'undefined' && (execAttribute == 'request' || execAttribute == 'review')))
|
||||
{
|
||||
$('#fieldsstory').parent('div').addClass('hidden');
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ class taskModel extends model
|
||||
$task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->create['id'], $this->post->uid);
|
||||
|
||||
/* Fix Bug #1525 */
|
||||
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('lifetime');
|
||||
if($executionLifetime == 'ops')
|
||||
$execution = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch();
|
||||
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review')
|
||||
{
|
||||
$requiredFields = str_replace(",story,", ',', "$requiredFields");
|
||||
$task->story = 0;
|
||||
@@ -381,9 +381,9 @@ class taskModel extends model
|
||||
}
|
||||
|
||||
/* Fix bug #1525*/
|
||||
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('lifetime');
|
||||
$execution = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch();
|
||||
$requiredFields = ',' . $this->config->task->create->requiredFields . ',';
|
||||
if($executionLifetime == 'ops') $requiredFields = str_replace(',story,', ',', $requiredFields);
|
||||
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review') $requiredFields = str_replace(',story,', ',', $requiredFields);
|
||||
$requiredFields = trim($requiredFields, ',');
|
||||
|
||||
/* check data. */
|
||||
@@ -1036,9 +1036,9 @@ class taskModel extends model
|
||||
$task->mode = '';
|
||||
}
|
||||
|
||||
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('lifetime');
|
||||
$execution = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch();
|
||||
$requiredFields = "," . $this->config->task->edit->requiredFields . ",";
|
||||
if($executionLifetime == 'ops')
|
||||
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review')
|
||||
{
|
||||
$requiredFields = str_replace(",story,", ',', "$requiredFields");
|
||||
$task->story = 0;
|
||||
|
||||
@@ -45,7 +45,7 @@ $colspan = count($visibleFields) + 3;
|
||||
<?php echo $lang->task->batchCreate;?>
|
||||
<?php endif;?>
|
||||
</h2>
|
||||
<?php if($execution->lifetime != 'ops'):?>
|
||||
<?php if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
|
||||
<a class="checkbox-primary pull-left" id='zeroTaskStory' href='javascript:toggleZeroTaskStory();'>
|
||||
<label><?php echo $lang->story->zeroTask;?></label>
|
||||
</a>
|
||||
@@ -67,7 +67,7 @@ $colspan = count($visibleFields) + 3;
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?> moduleBox'><?php echo $lang->task->module?></th>
|
||||
<?php if($execution->lifetime != 'ops'):?>
|
||||
<?php if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
|
||||
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?> storyBox'><?php echo $lang->task->story;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-name required has-btn'><?php echo $lang->task->name;?></span></th>
|
||||
@@ -99,7 +99,7 @@ $colspan = count($visibleFields) + 3;
|
||||
$lang->task->typeList['ditto'] = $lang->task->ditto;
|
||||
$members['ditto'] = $lang->task->ditto;
|
||||
$modules['ditto'] = $lang->task->ditto;
|
||||
if($execution->lifetime == 'ops') $colspan = $colspan - 1;
|
||||
if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review') $colspan = $colspan - 1;
|
||||
?>
|
||||
<?php for($i = 1; $i <= $config->task->batchCreate; $i++):?>
|
||||
<?php
|
||||
@@ -121,7 +121,7 @@ $colspan = count($visibleFields) + 3;
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id)'")?>
|
||||
<?php echo html::hidden("parent[$i]", $parent);?>
|
||||
</td>
|
||||
<?php if($execution->lifetime != 'ops'):?>
|
||||
<?php if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
|
||||
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
|
||||
@@ -266,7 +266,7 @@ $colspan = count($visibleFields) + 3;
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
|
||||
<?php echo html::hidden("parent[$i]", $parent);?>
|
||||
</td>
|
||||
<?php if($execution->lifetime != 'ops'):?>
|
||||
<?php if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
|
||||
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
|
||||
|
||||
@@ -4742,6 +4742,7 @@ class upgradeModel extends model
|
||||
$data->begin = $projects[$projectID]->begin;
|
||||
$data->end = $projects[$projectID]->end;
|
||||
$data->projectStatus = $projects[$projectID]->status;
|
||||
$data->team = $projects[$projectID]->team;
|
||||
$data->PM = $projects[$projectID]->PM;
|
||||
$data->projectAcl = $projects[$projectID]->acl == 'custom' ? 'private' : $projects[$projectID]->acl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user