* Finish task #64884.
This commit is contained in:
+14
-6
@@ -89,7 +89,7 @@ class taskModel extends model
|
||||
->cleanINT('execution,story,module')
|
||||
->stripTags($this->config->task->editor->create['id'], $this->config->allowedTags)
|
||||
->join('mailto', ',')
|
||||
->remove('after,files,labels,assignedTo,uid,storyEstimate,storyDesc,storyPri,team,teamEstimate,teamMember,multiple,teams,contactListMenu,selectTestStory,testStory,testPri,testEstStarted,testDeadline,testAssignedTo,testEstimate,sync,otherLane,region,lane')
|
||||
->remove('after,files,labels,assignedTo,uid,storyEstimate,storyDesc,storyPri,team,teamEstimate,teamMember,multiple,teams,contactListMenu,selectTestStory,testStory,testPri,testEstStarted,testDeadline,testAssignedTo,testEstimate,sync,otherLane,region,lane,estStartedDitto,deadlineDitto')
|
||||
->add('version', 1)
|
||||
->get();
|
||||
|
||||
@@ -177,6 +177,10 @@ class taskModel extends model
|
||||
$this->loadModel('action');
|
||||
if($this->post->testStory)
|
||||
{
|
||||
$assignedTo = '';
|
||||
$testEstStarted = '0000-00-00';
|
||||
$testDeadline = '0000-00-00';
|
||||
|
||||
foreach($this->post->testStory as $storyID)
|
||||
{
|
||||
if($storyID) $testStoryIdList[$storyID] = $storyID;
|
||||
@@ -186,14 +190,18 @@ class taskModel extends model
|
||||
{
|
||||
if(!isset($testStories[$storyID])) continue;
|
||||
|
||||
$assignedTo = (!isset($this->post->testAssignedTo[$i]) or $this->post->testAssignedTo[$i] == 'ditto') ? $assignedTo : $this->post->testAssignedTo[$i];
|
||||
$testEstStarted = (!isset($this->post->testEstStarted[$i]) or (isset($this->post->estStartedDitto[$i]) and $this->post->estStartedDitto[$i] == 'on')) ? $testEstStarted : $this->post->testEstStarted[$i];
|
||||
$testDeadline = (!isset($this->post->testDeadline[$i]) or (isset($this->post->deadlineDitto[$i]) and $this->post->deadlineDitto[$i] == 'on')) ? $testDeadline : $this->post->testDeadline[$i];
|
||||
|
||||
$task->parent = $taskID;
|
||||
$task->story = $storyID;
|
||||
$task->storyVersion = $testStories[$storyID]->version;
|
||||
$task->name = $this->lang->task->lblTestStory . " #{$storyID} " . $testStories[$storyID]->title;
|
||||
$task->pri = $this->post->testPri[$i];
|
||||
$task->estStarted = $this->post->testEstStarted[$i];
|
||||
$task->deadline = $this->post->testDeadline[$i];
|
||||
$task->assignedTo = $this->post->testAssignedTo[$i];
|
||||
$task->estStarted = $testEstStarted;
|
||||
$task->deadline = $testDeadline;
|
||||
$task->assignedTo = $assignedTo;
|
||||
$task->estimate = $this->post->testEstimate[$i];
|
||||
$task->left = $this->post->testEstimate[$i];
|
||||
$task->module = $testStories[$storyID]->module;
|
||||
@@ -3947,9 +3955,9 @@ class taskModel extends model
|
||||
{
|
||||
$this->updateExecutionEsDateByGantt($objectID, $objectType, $post);
|
||||
}
|
||||
|
||||
|
||||
if(dao::isError()) return false;
|
||||
|
||||
|
||||
$newObject = $this->dao->select('*')->from($changeTable)->where('id')->eq($objectID)->fetch();
|
||||
$changes = common::createChanges($oldObject, $newObject);
|
||||
$actionID = $this->loadModel('action')->create($actionType, $objectID, 'edited');
|
||||
|
||||
@@ -135,18 +135,25 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
<tbody>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($stories 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>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input("testEstStarted[]", $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?>
|
||||
<?php
|
||||
echo html::input("testEstStarted[]", $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");
|
||||
if($i != 0) echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='estStartedDitto[$i]' id='estStartedDitto$i' " . ($i > 0 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
|
||||
?>
|
||||
<span class='input-group-addon fix-border'>~</span>
|
||||
<?php echo html::input("testDeadline[]", $task->deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");?>
|
||||
<?php
|
||||
echo html::input("testDeadline[]", $task->deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");
|
||||
if($i != 0) echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[$i]' id='deadlineDitto$i' " . ($i > 0 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::select("testAssignedTo[]", $members, $task->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select("testAssignedTo[]", $members, $i == 0 ? $task->assignedTo : 'ditto', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::input("testEstimate[]", '', "class='form-control'");?></td>
|
||||
<td class='text-center'>
|
||||
<div class="btn-group">
|
||||
|
||||
Reference in New Issue
Block a user