Merge branch 'sprint/master_zhouxudong' into 'master'
* Optimization task #64884. See merge request easycorp/zentaopms!5032
This commit is contained in:
+12
-2
@@ -267,7 +267,7 @@ class task extends control
|
||||
if(!isset($moduleOptionMenu[$task->module])) $task->module = 0;
|
||||
}
|
||||
|
||||
$stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', '', 'full', 'active');
|
||||
$stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', '', '', 'active');
|
||||
|
||||
/* Get block id of assinge to me. */
|
||||
$blockID = 0;
|
||||
@@ -293,11 +293,21 @@ class task extends control
|
||||
|
||||
$executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, 'noclosed', 0, true);
|
||||
|
||||
$testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $execution->id);
|
||||
/* Stories that can be used to create test tasks. */
|
||||
$testStories = array();
|
||||
foreach($stories as $storyID => $storyTitle)
|
||||
{
|
||||
if(empty($storyID) or isset($testStoryIdList[$storyID])) continue;
|
||||
$testStories[$storyID] = $storyTitle;
|
||||
}
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->task->custom->createFields;
|
||||
$this->view->showAllModule = $showAllModule;
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->testStories = $testStories;
|
||||
$this->view->position = $position;
|
||||
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'task', "executionID=$executionID") : '';
|
||||
$this->view->execution = $execution;
|
||||
@@ -307,7 +317,7 @@ class task extends control
|
||||
$this->view->users = $users;
|
||||
$this->view->storyID = $storyID;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $execution->id);
|
||||
$this->view->testStoryIdList = $testStoryIdList;
|
||||
$this->view->members = $members;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
|
||||
@@ -369,7 +369,7 @@ function addItem(obj)
|
||||
var $tr = $(obj).closest('tr');
|
||||
$tr.after($tr.clone());
|
||||
var $nextTr = $tr.next();
|
||||
$nextTr.find('#testAssignedTo').val($('#assignedTo').val());
|
||||
$nextTr.find('#testAssignedTo').val('ditto');
|
||||
$nextTr.find('#testStory').closest('td').find('.chosen-container').remove();
|
||||
$nextTr.find('#testStory').closest('td').find('select').val('').chosen();
|
||||
$nextTr.find('#testPri').closest('td').find('.chosen-container').remove();
|
||||
|
||||
@@ -123,20 +123,19 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
<td colspan='3'>
|
||||
<table class='table table-form mg-0 table-bordered'>
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class='text-center'>
|
||||
<th class='w-150px'><?php echo $lang->task->storyAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->task->pri;?></th>
|
||||
<th class='w-300px'><?php echo $lang->task->datePlan;?></th>
|
||||
<th class='w-150px'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-80px'><?php echo $lang->task->estimate;?></th>
|
||||
<th class='w-80px'><?php echo $lang->actions;?></th>
|
||||
<th class='w-60px'><?php echo $lang->task->pri;?></th>
|
||||
<th class='w-200px'><?php echo $lang->task->datePlan;?></th>
|
||||
<th class='w-60px'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-60px'><?php echo $lang->task->estimate;?></th>
|
||||
<th class='w-60px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($stories as $storyID => $storyTitle):?>
|
||||
<?php foreach($testStories as $storyID => $storyTitle):?>
|
||||
<?php if($i > 0) $members['ditto'] = $lang->task->ditto;?>
|
||||
<?php if(empty($storyID) or isset($testStoryIdList[$storyID])) continue;?>
|
||||
<tr>
|
||||
<td><?php echo html::select("testStory[]", array($storyID => $storyTitle), $storyID, "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select("testPri[]", $lang->task->priList, $task->pri, "class='form-control chosen'");?></td>
|
||||
@@ -342,8 +341,8 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php js::set('stories', $stories);?>
|
||||
<?php js::set('storyPinYin', (empty($config->isINT) and class_exists('common')) ? common::convert2Pinyin($stories) : array());?>
|
||||
<?php js::set('stories', $testStories);?>
|
||||
<?php js::set('storyPinYin', (empty($config->isINT) and class_exists('common')) ? common::convert2Pinyin($testStories) : array());?>
|
||||
<?php js::set('testStoryIdList', $testStoryIdList);?>
|
||||
<?php js::set('executionID', $execution->id);?>
|
||||
<?php js::set('executionType', $execution->type);?>
|
||||
|
||||
Reference in New Issue
Block a user