Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/master_lanzongjun_fixbug
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
<?php if(count($teams) > 3):?>
|
||||
<?php $lastMember = end($teams);?>
|
||||
<div title="<?php echo $lastMember->realname;?>">
|
||||
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$lastMember->account], 'account' => $lastMember->account, 'name' => $lastMember->realname), 'avatar-circle avatar-' . key($lastMember)); ?>
|
||||
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$lastMember->account], 'account' => $lastMember->account, 'name' => $lastMember->realname), 'avatar-circle avatar-' . key((array)$lastMember)); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
+1092
-1097
File diff suppressed because it is too large
Load Diff
@@ -142,7 +142,7 @@ class POP3 {
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
*/
|
||||
public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
|
||||
public function Authorise ($host, $port = false, $tval = false, $username = '', $password = '', $debug_level = 0) {
|
||||
$this->host = $host;
|
||||
|
||||
// If no port value is passed, retrieve it
|
||||
@@ -404,4 +404,4 @@ class POP3 {
|
||||
|
||||
// End of class
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -29,6 +29,7 @@ class HTMLPurifier_PropertyListIterator extends FilterIterator
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function accept()
|
||||
{
|
||||
$key = $this->getInnerIterator()->key();
|
||||
|
||||
@@ -20,6 +20,7 @@ class HTMLPurifier_StringHash extends ArrayObject
|
||||
* @param mixed $index
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($index)
|
||||
{
|
||||
$this->accessed[$index] = true;
|
||||
|
||||
@@ -37,6 +37,7 @@ class Requests_Utility_FilteredIterator extends ArrayIterator {
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current() {
|
||||
$value = parent::current();
|
||||
|
||||
@@ -50,6 +51,7 @@ class Requests_Utility_FilteredIterator extends ArrayIterator {
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function unserialize($serialized) {}
|
||||
|
||||
/**
|
||||
@@ -57,6 +59,7 @@ class Requests_Utility_FilteredIterator extends ArrayIterator {
|
||||
*
|
||||
* @phpcs:disable PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __unserialize($serialized) {}
|
||||
|
||||
public function __wakeup() {
|
||||
|
||||
@@ -79,7 +79,7 @@ $lang->admin->safe->reasonList['birthday'] = 'Giống ngày sinh';
|
||||
$lang->admin->safe->modifyPasswordList[1] = 'Có';
|
||||
$lang->admin->safe->modifyPasswordList[0] = 'Không';
|
||||
|
||||
$lang->admin->safe->loginCaptchaList[1] = 'Yes'
|
||||
$lang->admin->safe->loginCaptchaList[1] = 'Yes';
|
||||
$lang->admin->safe->loginCaptchaList[0] = 'No';
|
||||
|
||||
$lang->admin->safe->noticeMode = 'Mật khẩu sẽ được kiểm tra khi người dùng đăng nhập hoặc người dùng thêm hoặc sửa.';
|
||||
|
||||
@@ -78,9 +78,15 @@ $(function()
|
||||
hiddenRequireFields();
|
||||
});
|
||||
|
||||
var maxAutoDropWidth = document.body.scrollWidth + (document.getElementById('resolutions1').offsetWidth / 2) - document.getElementById('resolutions1').getBoundingClientRect().right;
|
||||
$('select[id^="duplicateBugs"]').picker(
|
||||
{
|
||||
disableEmptySearch : true,
|
||||
dropWidth : 'auto'
|
||||
dropWidth : 'auto',
|
||||
maxAutoDropWidth : maxAutoDropWidth,
|
||||
onReady: function(event)
|
||||
{
|
||||
$(event.picker.$container).addClass('required');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -23,7 +23,8 @@ $(function()
|
||||
$('#duplicateBug').picker(
|
||||
{
|
||||
disableEmptySearch : true,
|
||||
dropWidth : 'auto'
|
||||
dropWidth : 'auto',
|
||||
maxAutoDropWidth : document.body.scrollWidth + document.getElementById('resolution').offsetWidth - document.getElementById('resolution').getBoundingClientRect().right
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ js::set('page', 'confirmbug');
|
||||
<?php $this->printExtendFields($bug, 'table');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td colspan='2'><?php echo html::select('mailto[]', $users, str_replace(' ' , '', $bug->mailto), 'class="form-control picker-select" multiple');?></td>
|
||||
<td colspan='2'><?php echo html::select('mailto[]', $users, $bug->mailto, 'class="form-control picker-select" multiple');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -191,7 +191,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('mailto[]', $users, str_replace(' ', '', $bug->mailto), 'class="form-control picker-select" multiple');?>
|
||||
<?php echo html::select('mailto[]', $users, $bug->mailto, 'class="form-control picker-select" multiple');?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists');?>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -42,7 +42,7 @@ js::set('productID' , $bug->product);
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->resolvedBuild;?></th>
|
||||
<td id='newBuildExecutionBox' class='hidden'>
|
||||
<td id='newBuildExecutionBox' class='hidden required'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo (!empty($execution) and $execution->type == 'kanban') ? $lang->bug->kanban : $lang->build->execution;?></span>
|
||||
<?php echo html::select('buildExecution', $executions, $bug->execution, "class='form-control chosen'");?>
|
||||
@@ -50,7 +50,7 @@ js::set('productID' , $bug->product);
|
||||
</td>
|
||||
<td>
|
||||
<div id='resolvedBuildBox'><?php echo html::select('resolvedBuild', $builds, '', "class='form-control chosen'");?></div>
|
||||
<div id='newBuildBox' class='hidden'><?php echo html::input('buildName', '', "class='form-control' placeholder='{$lang->bug->placeholder->newBuildName}'");?></div>
|
||||
<div id='newBuildBox' class='hidden required'><?php echo html::input('buildName', '', "class='form-control' placeholder='{$lang->bug->placeholder->newBuildName}'");?></div>
|
||||
</td>
|
||||
<td>
|
||||
<?php if(common::hasPriv('build', 'create')):?>
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(empty($bug->mailto))
|
||||
if(!empty($bug->mailto))
|
||||
{
|
||||
foreach(explode(',', str_replace(' ', '', $bug->mailto)) as $account) echo ' ' . zget($users, $account);
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -1 +1,2 @@
|
||||
.table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;}
|
||||
.c-pri {width: 100px};
|
||||
|
||||
@@ -1,32 +1,10 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php
|
||||
$requiredFields = $datas->requiredFields;
|
||||
$allCount = $datas->allCount;
|
||||
$allPager = $datas->allPager;
|
||||
$pagerID = $datas->pagerID;
|
||||
$isEndPage = $datas->isEndPage;
|
||||
$maxImport = $datas->maxImport;
|
||||
$dataInsert = $datas->dataInsert;
|
||||
$fields = $datas->fields;
|
||||
$suhosinInfo = $datas->suhosinInfo;
|
||||
$model = $datas->model;
|
||||
$datas = $datas->datas;
|
||||
?>
|
||||
<style>
|
||||
form{overflow-x: scroll}
|
||||
thead > tr > th{width:150px;}
|
||||
.c-estimate {width:150px;}
|
||||
.c-story{width:150px;}
|
||||
.c-step{width:400px;}
|
||||
.c-pri,.c-stage{width:150px}
|
||||
.c-precondition{width:200px;}
|
||||
</style>
|
||||
<?php if(!empty($suhosinInfo)):?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo?></div>
|
||||
<?php elseif(empty($maxImport) and $allCount > $this->config->file->maxImport):?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->port->import;?></h2>
|
||||
<h2><?php echo $lang->caselib->import;?></h2>
|
||||
</div>
|
||||
<p><?php echo sprintf($lang->file->importSummary, $allCount, html::input('maxImport', $config->file->maxImport, "style='width:50px'"), ceil($allCount / $config->file->maxImport));?></p>
|
||||
<p><?php echo html::commonButton($lang->import, "id='import'", 'btn btn-primary');?></p>
|
||||
@@ -38,197 +16,114 @@ $(function()
|
||||
{
|
||||
if(parseInt($('#maxImport').val())) $('#times').html(Math.ceil(parseInt($('#allCount').html()) / parseInt($('#maxImport').val())));
|
||||
});
|
||||
$('#import').click(function()
|
||||
{
|
||||
$.cookie('maxImport', $('#maxImport').val());
|
||||
location.href = createLink('caselib', 'showImport', "libID=<?php echo $libID;?>&pageID=1&maxImport=" + $('#maxImport').val())
|
||||
});
|
||||
$('#import').click(function(){location.href = createLink('caselib', 'showImport', "libID=<?php echo $libID;?>&pageID=1&maxImport=" + $('#maxImport').val())})
|
||||
});
|
||||
</script>
|
||||
<?php else:?>
|
||||
<?php js::set('requiredFields', $requiredFields);?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header clearfix">
|
||||
<h2><?php echo $lang->port->import;?></h2>
|
||||
<h2><?php echo $lang->caselib->import;?></h2>
|
||||
</div>
|
||||
<form class='main-form' target='hiddenwin' method='post'>
|
||||
<form target='hiddenwin' method='post'>
|
||||
<table class='table table-form' id='showData'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-70px'> <?php echo $lang->port->id?></th>
|
||||
|
||||
<?php foreach($fields as $key => $value):?>
|
||||
|
||||
<?php if($key == 'stepDesc' or $key == 'stepExpect'):?>
|
||||
<?php if($key == 'stepExpect') continue;?>
|
||||
<th class='c-step'>
|
||||
<th class='c-number'><?php echo $lang->testcase->id?></th>
|
||||
<th class='c-title' id='title'> <?php echo $lang->testcase->title?></th>
|
||||
<th class='c-module' id='module'> <?php echo $lang->testcase->module?></th>
|
||||
<th class='c-pri' id='pri'> <?php echo $lang->testcase->pri?></th>
|
||||
<th class='c-type' id='type'> <?php echo $lang->testcase->type?></th>
|
||||
<th class='c-stage' id='stage'> <?php echo $lang->testcase->stage?></th>
|
||||
<th class='c-text' id='keywords'> <?php echo $lang->testcase->keywords?></th>
|
||||
<th class='c-precondition' id='precondition'><?php echo $lang->testcase->precondition?></th>
|
||||
<th class='c-case-step col-content'>
|
||||
<table class='w-p100 table-borderless'>
|
||||
<tr>
|
||||
<th class="no-padding"><?php echo $fields['stepDesc']['title']?></th>
|
||||
<th class="no-padding"><?php echo $fields['stepExpect']['title']?></th>
|
||||
<th><?php echo $lang->testcase->stepDesc?></th>
|
||||
<th><?php echo $lang->testcase->stepExpect?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</th>
|
||||
|
||||
<?php elseif($value['control'] != 'hidden'):?>
|
||||
<th class='c-<?php echo $key?>' id='<?php echo $key;?>'> <?php echo $value['title'];?></th>
|
||||
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php
|
||||
if(!empty($appendFields))
|
||||
{
|
||||
foreach($appendFields as $field)
|
||||
{
|
||||
if(!$field->show) continue;
|
||||
|
||||
$width = ($field->width && $field->width != 'auto' ? $field->width . 'px' : 'auto');
|
||||
$required = strpos(",$field->rules,", ",$notEmptyRule->id,") !== false ? 'required' : '';
|
||||
echo "<th class='$required' style='width: $width'>$field->name</th>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$insert = true;
|
||||
$addID = 1;
|
||||
$hasMultiple = false;
|
||||
?>
|
||||
<?php foreach($datas as $key => $object):?>
|
||||
<tr class='text-top'>
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($object->id))
|
||||
{
|
||||
echo $object->id . html::hidden("id[$key]", $object->id);
|
||||
$insert = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sub = (strpos($object->title, '>') === 0) ? " <sub style='vertical-align:sub;color:red'>{$lang->port->children}</sub>" : " <sub style='vertical-align:sub;color:gray'>{$lang->port->new}</sub>";
|
||||
echo $addID++ . $sub;
|
||||
}
|
||||
echo html::hidden("lib[$key]", $libID);
|
||||
?>
|
||||
</td>
|
||||
<?php foreach($fields as $field => $value):?>
|
||||
|
||||
<?php if($value['control'] == 'select'):?>
|
||||
<td><?php echo html::select("{$field}[$key]", $value['values'], !empty($object->$field) ? $object->$field : '', "class='form-control chosen'")?></td>
|
||||
|
||||
<?php elseif($value['control'] == 'multiple'):?>
|
||||
<?php if(!isset($value['values'][''])) $value['values'][''] = '';?>
|
||||
<td><?php echo html::select("{$field}[$key][]", $value['values'], !empty($object->$field) ? $object->$field : '', "multiple class='form-control chosen'")?></td>
|
||||
|
||||
<?php elseif($value['control'] == 'date'):?>
|
||||
<?php $dateMatch = $this->config->port->dateMatch;?>
|
||||
<?php if(!preg_match($dateMatch, $object->$field)) $object->$field = ''; ?>
|
||||
<td><?php echo html::input("{$field}[$key]", !empty($object->$field) ? $object->$field : '', "class='form-control form-date autocomplete='off'")?></td>
|
||||
|
||||
<?php elseif($value['control'] == 'datetime'):?>
|
||||
<td><?php echo html::input("{$field}[$key]", !empty($object->$field) ? $object->$field : '', "class='form-control form-datetime autocomplete='off'")?></td>
|
||||
|
||||
<?php elseif($value['control'] == 'hidden'):?>
|
||||
<?php echo html::hidden("{$field}[$key]", $object->$field)?>
|
||||
|
||||
<?php elseif($value['control'] == 'textarea'):?>
|
||||
<td><?php echo html::textarea("{$field}[$key]", $object->$field, "class='form-control' cols='50' rows='1'")?></td>
|
||||
|
||||
<?php elseif($field == 'stepDesc' or $field == 'stepExpect'):?>
|
||||
<?php if($field == 'stepExpect') continue;?>
|
||||
<td>
|
||||
<?php if(isset($stepData[$key]['desc'])):?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<?php $hasStep = false;?>
|
||||
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
|
||||
<?php if(empty($desc['content'])) continue;?>
|
||||
<tr class='step'>
|
||||
<?php $hasStep = true;?>
|
||||
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
|
||||
<td><?php echo html::textarea("desc[$key][$id]", htmlSpecialString($desc['content']), "class='form-control'")?></td>
|
||||
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlSpecialString($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if(!$hasStep):?>
|
||||
<tr class='step'>
|
||||
<td><?php echo '1' . html::hidden("stepType[$key][1]", 'step')?></td>
|
||||
<td><?php echo html::textarea("desc[$key][1]", '', "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("expect[$key][1]", '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<tr class='step'>
|
||||
<td><?php echo '1' . html::hidden("stepType[$key][1]", 'step')?></td>
|
||||
<td><?php echo html::textarea("desc[$key][1]", '', "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("expect[$key][1]", '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
|
||||
<?php else:?>
|
||||
<td><?php echo html::input("{$field}[$key]", !empty($object->$field) ? $object->$field : '', "class='form-control autocomplete='off'")?></td>
|
||||
<?php endif;?>
|
||||
|
||||
<?php endforeach;?>
|
||||
<?php
|
||||
$insert = true;
|
||||
$hideContentCol = true;
|
||||
?>
|
||||
<?php foreach($caseData as $key => $case):?>
|
||||
<?php if(empty($case->title)) continue;?>
|
||||
<?php if(!empty($case->id) and !isset($cases[$case->id])) $case->id = 0;?>
|
||||
<tr class='text-left' valign='top'>
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($appendFields))
|
||||
if(!empty($case->id))
|
||||
{
|
||||
$this->loadModel('flow');
|
||||
foreach($appendFields as $field)
|
||||
{
|
||||
if(!$field->show) continue;
|
||||
$value = $field->defaultValue ? $field->defaultValue : zget($datas, $field->field, '');
|
||||
echo '<td>' . $this->flow->buildControl($field, $value, "$field->field[$key]", true) . '</td>';
|
||||
}
|
||||
echo $case->id . html::hidden("id[$key]", $case->id);
|
||||
$insert = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $key . " <sup class='text-green small'>{$lang->testcase->new}</sup>";
|
||||
}
|
||||
echo html::hidden("lib[$key]", $libID);
|
||||
?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<td><?php echo html::input("title[$key]", $case->title, "class='form-control' style='margin-top:2px'")?></td>
|
||||
<td style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
|
||||
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control chosen'")?></td>
|
||||
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control chosen'")?></td>
|
||||
<td style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
|
||||
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlSpecialString($case->precondition) : "", "class='form-control'")?></td>
|
||||
<td class='col-content'>
|
||||
<?php if(isset($stepData[$key]['desc'])):?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
|
||||
<?php
|
||||
if(empty($desc['content'])) continue;
|
||||
$hideContentCol = false;
|
||||
?>
|
||||
<tr class='step'>
|
||||
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
|
||||
<td><?php echo html::textarea("desc[$key][$id]", htmlSpecialString($desc['content']), "class='form-control'")?></td>
|
||||
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlSpecialString($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10' class='text-center form-actions'>
|
||||
<td colspan='9' class='text-center form-actions'>
|
||||
<?php
|
||||
$submitText = $isEndPage ? $this->lang->save : $this->lang->file->saveAndNext;
|
||||
$isStartPage = $pagerID == 1 ? true : false;
|
||||
$submitText = $isEndPage ? $this->lang->save : $this->lang->file->saveAndNext;
|
||||
if(!$insert and $dataInsert === '')
|
||||
{
|
||||
echo "<button type='button' data-toggle='modal' data-target='#importNoticeModal' class='btn btn-primary btn-wide'>{$submitText}</button>";
|
||||
echo "<button type='button' data-toggle='modal' data-target='#importNoticeModal' class='btn btn-primary btn-wide'>{$submitText}</button>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::submitButton($submitText);
|
||||
if($dataInsert !== '') echo html::hidden('insert', $dataInsert);
|
||||
echo html::submitButton($submitText);
|
||||
if($dataInsert !== '') echo html::hidden('insert', $dataInsert);
|
||||
}
|
||||
echo html::hidden('isEndPage', $isEndPage ? 1 : 0);
|
||||
echo html::hidden('pagerID', $pagerID);
|
||||
echo ' ' . html::a("javascript:history.back(-1)", $lang->goback, '', "class='btn btn-back btn-wide'");
|
||||
echo ' ' . html::a($this->createLink('caselib', 'browse', "libID=$libID"), $lang->goback, '', 'class="btn btn-wide"');
|
||||
echo ' ' . sprintf($lang->file->importPager, $allCount, $pagerID, $allPager);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php if(!$insert and $dataInsert === '') include $app->getModuleRoot() . 'common/view/noticeimport.html.php';?>
|
||||
<?php if(!$insert and $dataInsert === '') include '../../common/view/noticeimport.html.php';?>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$.fixedTableHead('#showData');
|
||||
<?php if($hasMultiple):?>
|
||||
$('th.estimate').addClass('text-center w-250px');
|
||||
<?php endif;?>
|
||||
$("#showData th").each(function()
|
||||
{
|
||||
if(requiredFields.indexOf(this.id) !== -1) $("#" + this.id).addClass('required');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
<?php if(isset($hideContentCol) and $hideContentCol):?>
|
||||
<style>#mainContent .col-content{display: none;}</style>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -36,6 +36,8 @@ $(function()
|
||||
|
||||
var $newRow = $(rowTpl.replace(/%s/g, lastIndex + 1));
|
||||
$newRow.find('.chosen').chosen();
|
||||
$newRow.find('.picker').remove()
|
||||
$newRow.find('.picker-select').picker();
|
||||
$newRow.find('.iframe').modalTrigger({iframe:true});
|
||||
$newRow.find('[data-provide="colorpicker-later"]').colorPicker();
|
||||
$newRow.datepickerAll();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$(function()
|
||||
{
|
||||
loadDocLibs('product');
|
||||
loadDocLibs(defaultType);
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,4 +41,5 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php js::set('defaultType', $defaultType);?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -315,7 +315,7 @@ $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been linke
|
||||
/* Interactive prompts. */
|
||||
$lang->execution->confirmDelete = "Bạn có muốn xóa {$lang->executionCommon}[%s] này?";
|
||||
$lang->execution->confirmUnlinkMember = "Bạn có muốn hủy liên kết người dùng này từ {$lang->executionCommon}?";
|
||||
$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?;"
|
||||
$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?";
|
||||
$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?";
|
||||
$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again.";
|
||||
$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action.";
|
||||
|
||||
@@ -1464,8 +1464,6 @@ class executionModel extends model
|
||||
*/
|
||||
public function getStatData($projectID = 0, $browseType = 'undone', $productID = 0, $branch = 0, $withTasks = false, $param = '', $orderBy = 'id_asc', $pager = null)
|
||||
{
|
||||
if($projectID) return array();
|
||||
|
||||
/* Construct the query SQL at search executions. */
|
||||
$executionQuery = '';
|
||||
if($browseType == 'bySearch')
|
||||
|
||||
@@ -1246,7 +1246,7 @@ EOF;
|
||||
$this->user->updatePassword($this->app->user->id);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess,locate => $this->createLink('my', 'index')));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('my', 'index')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->changePassword;
|
||||
|
||||
@@ -1199,7 +1199,8 @@ class productModel extends model
|
||||
->where('t1.product')->eq($productID)
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('t2.type')->eq('project')->fi()
|
||||
->beginIF($this->config->systemMode == 'classic')->andWhere('t2.type')->eq('sprint')->fi()
|
||||
->beginIF($browseType != 'all')->andWhere('t2.status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'undone')->andWhere('t2.status')->in('wait,doing')->fi()
|
||||
->beginIF(strpos(",all,undone,", ",$browseType,") === false)->andWhere('t2.status')->eq($browseType)->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->systemMode == 'new')->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->systemMode == 'classic')->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF($this->cookie->involved or $involved)
|
||||
|
||||
@@ -575,7 +575,7 @@ class programModel extends model
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('t1.type')->eq('project')->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and ($this->cookie->involved or $involved))->andWhere('t2.type')->eq('project')->fi()
|
||||
->beginIF(!in_array($browseType, array('all', 'undone', 'bysearch', 'review', 'unclosed'), true))->andWhere('t1.status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'undone' or $browseType = 'unclosed')->andWhere('t1.status')->in('wait,doing')->fi()
|
||||
->beginIF($browseType == 'undone' or $browseType == 'unclosed')->andWhere('t1.status')->in('wait,doing')->fi()
|
||||
->beginIF($browseType == 'review')
|
||||
->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")
|
||||
->andWhere('t1.reviewStatus')->eq('doing')
|
||||
|
||||
@@ -234,7 +234,6 @@ class project extends control
|
||||
{
|
||||
$selectedProgram = $this->loadModel('program')->getByID($selectedProgramID);
|
||||
if($selectedProgram->budget) $availableBudget = $this->program->getBudgetLeft($selectedProgram);
|
||||
if(isset($selectedProgram)) $allProducts = $this->program->getProductPairs($selectedProgram->id, 'assign', 'noclosed');
|
||||
}
|
||||
|
||||
if(!empty($objectID))
|
||||
@@ -253,17 +252,16 @@ class project extends control
|
||||
$data = array();
|
||||
if(isset($selectedProgram))
|
||||
{
|
||||
$data['selectedProgramBegin'] = $selectedProgram->begin;
|
||||
$data['selectedProgramEnd'] = $selectedProgram->end;
|
||||
$data['budgetUnit'] = $selectedProgram->budgetUnit;
|
||||
$allProducts = array(0 => '') + $allProducts;
|
||||
/* Finish task #64882.Get the path of the currently selected program. */
|
||||
$data['selectedProgramPath'] = explode(',', $selectedProgram->path);
|
||||
/* Get the products that can be linked with the currently selected program. */
|
||||
$data['allProducts'] = html::select("products[0]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");
|
||||
$data['plans'] = html::select('plans[][][]', '', '', 'class=\'form-control chosen\' multiple');
|
||||
$data['selectedProgramBegin'] = $selectedProgram->begin;
|
||||
$data['selectedProgramEnd'] = $selectedProgram->end;
|
||||
$data['budgetUnit'] = $selectedProgram->budgetUnit;
|
||||
$data['selectedProgramPath'] = explode(',', $selectedProgram->path);
|
||||
}
|
||||
|
||||
$allProducts = array(0 => '') + $this->program->getProductPairs($selectedProgramID, 'assign', 'noclosed');
|
||||
$data['allProducts'] = html::select("products[0]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");
|
||||
$data['plans'] = html::select('plans[][][]', '', '', 'class=\'form-control chosen\' multiple');
|
||||
|
||||
/* Finish task #64882.Get the path of the last selected program. */
|
||||
if(!empty($objectID)) $data['objectPath'] = explode(',', $object->path);
|
||||
if(isset($availableBudget)) $data['availableBudget'] = $availableBudget;
|
||||
@@ -363,8 +361,6 @@ class project extends control
|
||||
$programTitle = $this->loadModel('setting')->getItem('owner=' . $this->app->user->account . '&module=project&key=programTitle');
|
||||
$projectStats = $this->loadModel('program')->getProjectStats($programID, $browseType, $queryID, $orderBy, $pager, $programTitle);
|
||||
|
||||
$this->lang->project->statusList['delay'] = $this->lang->project->delay;
|
||||
|
||||
$this->view->title = $this->lang->project->browse;
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
@@ -64,7 +64,6 @@ $lang->project->budgetNumber = '『Budget』must be numbers.';
|
||||
$lang->project->budgetGe0 = '『Budget』must be greater than or equal to 0.';
|
||||
$lang->project->allProjects = 'All Projects';
|
||||
$lang->project->ignore = 'Ignore';
|
||||
$lang->project->delay = 'Delayed';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = 'Project';
|
||||
@@ -279,6 +278,7 @@ $lang->project->statusList['wait'] = 'Waiting';
|
||||
$lang->project->statusList['doing'] = 'Doing';
|
||||
$lang->project->statusList['suspended'] = 'Suspended';
|
||||
$lang->project->statusList['closed'] = 'Closed';
|
||||
$lang->project->statusList['delay'] = 'Delayed';
|
||||
|
||||
$lang->project->endList[31] = 'One month';
|
||||
$lang->project->endList[93] = 'Trimester';
|
||||
|
||||
@@ -64,7 +64,6 @@ $lang->project->budgetNumber = '『Budget』must be numbers.';
|
||||
$lang->project->budgetGe0 = '『Budget』must be greater than or equal to 0.';
|
||||
$lang->project->allProjects = 'All Projects';
|
||||
$lang->project->ignore = 'Ignore';
|
||||
$lang->project->delay = 'Delayed';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = 'Project';
|
||||
@@ -279,6 +278,7 @@ $lang->project->statusList['wait'] = 'Waiting';
|
||||
$lang->project->statusList['doing'] = 'Doing';
|
||||
$lang->project->statusList['suspended'] = 'Suspended';
|
||||
$lang->project->statusList['closed'] = 'Closed';
|
||||
$lang->project->statusList['delay'] = 'Delayed';
|
||||
|
||||
$lang->project->endList[31] = 'One month';
|
||||
$lang->project->endList[93] = 'Trimester';
|
||||
|
||||
@@ -64,7 +64,6 @@ $lang->project->budgetNumber = '『Budget』must be numbers.';
|
||||
$lang->project->budgetGe0 = '『Budget』must be greater than or equal to 0.';
|
||||
$lang->project->allProjects = 'All Projects';
|
||||
$lang->project->ignore = 'Ignorer';
|
||||
$lang->project->delay = 'Delayed';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = 'Projets';
|
||||
@@ -279,6 +278,7 @@ $lang->project->statusList['wait'] = 'Waiting';
|
||||
$lang->project->statusList['doing'] = 'Doing';
|
||||
$lang->project->statusList['suspended'] = 'Suspended';
|
||||
$lang->project->statusList['closed'] = 'Closed';
|
||||
$lang->project->statusList['delay'] = 'Delayed';
|
||||
|
||||
$lang->project->endList[31] = 'One month';
|
||||
$lang->project->endList[93] = 'Trimester';
|
||||
|
||||
@@ -64,7 +64,6 @@ $lang->project->budgetNumber = '『预算』金额必须为数字。';
|
||||
$lang->project->budgetGe0 = '『预算』金额必须大于等于0。';
|
||||
$lang->project->allProjects = '所有项目';
|
||||
$lang->project->ignore = '忽略';
|
||||
$lang->project->delay = '已延期';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = '项目';
|
||||
@@ -279,6 +278,7 @@ $lang->project->statusList['wait'] = '未开始';
|
||||
$lang->project->statusList['doing'] = '进行中';
|
||||
$lang->project->statusList['suspended'] = '已挂起';
|
||||
$lang->project->statusList['closed'] = '已关闭';
|
||||
$lang->project->statusList['delay'] = '已延期';
|
||||
|
||||
$lang->project->endList[31] = '一个月';
|
||||
$lang->project->endList[93] = '三个月';
|
||||
|
||||
@@ -875,6 +875,10 @@ class projectModel extends model
|
||||
$this->config->project->search['queryID'] = $queryID;
|
||||
$this->config->project->search['actionURL'] = $actionURL;
|
||||
|
||||
$statusList = $this->lang->project->statusList;
|
||||
unset($statusList['delay']);
|
||||
$this->config->project->search['params']['status']['values'] = $statusList;
|
||||
|
||||
$programPairs = array(0 => '');
|
||||
$programPairs += $this->loadModel('program')->getPairs();
|
||||
$this->config->project->search['params']['parent']['values'] = $programPairs;
|
||||
|
||||
@@ -674,7 +674,7 @@ class reportModel extends model
|
||||
->beginIF($accounts)->andWhere('account')->in($accounts)->fi()
|
||||
->fetch();
|
||||
|
||||
$effort->consumed = round($effort->consumed, 2);
|
||||
$effort->consumed = !empty($effort->consumed) ? round($effort->consumed, 2) : 0;
|
||||
return $effort;
|
||||
}
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@ class story extends control
|
||||
$keywords = $oldBug->keywords;
|
||||
$spec = $oldBug->steps;
|
||||
$pri = !empty($oldBug->pri) ? $oldBug->pri : '3';
|
||||
if(strpos($oldBug->mailto, $oldBug->openedBy) === false)
|
||||
if($oldBug->mailto and strpos($oldBug->mailto, $oldBug->openedBy) === false)
|
||||
{
|
||||
$mailto = $oldBug->mailto . $oldBug->openedBy . ',';
|
||||
}
|
||||
@@ -1718,6 +1718,8 @@ class story extends control
|
||||
$storyIdList = $this->post->storyIdList;
|
||||
$storyIdList = array_unique($storyIdList);
|
||||
|
||||
$this->story->replaceURLang($storyType);
|
||||
|
||||
/* Get edited stories. */
|
||||
$stories = $this->story->getByList($storyIdList);
|
||||
$productStoryList = array();
|
||||
|
||||
@@ -83,6 +83,7 @@ $(function()
|
||||
$('#duplicateStory').picker(
|
||||
{
|
||||
disableEmptySearch : true,
|
||||
dropWidth : 'auto'
|
||||
dropWidth : 'auto',
|
||||
maxAutoDropWidth : document.body.scrollWidth + document.getElementById('duplicateStory').offsetWidth - document.getElementById('duplicateStoryBox').getBoundingClientRect().right
|
||||
});
|
||||
})
|
||||
|
||||
@@ -332,7 +332,7 @@ class testreportModel extends model
|
||||
$this->loadModel('tree');
|
||||
$modules = array();
|
||||
$data = array();
|
||||
if(is_string($productIdList)) $productIdList = explode(',', $productIdList);
|
||||
if(!is_array($productIdList)) $productIdList = explode(',', $productIdList);
|
||||
foreach($productIdList as $productID) $modules += $this->tree->getOptionMenu($productID, $viewType = 'bug');
|
||||
foreach($moduleGroups as $moduleID => $count)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<td title="<?php echo zget($lang->issue->typeList, $issue->type);?>"><?php echo zget($lang->issue->typeList, $issue->type);?></td>
|
||||
<td class="text-ellipsis" title="<?php echo $issue->title;?>"><?php echo html::a($this->createLink('issue', 'view', "id=$issue->id", '', '', $issue->project), $issue->title, '', "data-group='project'");?></td>
|
||||
<td title="<?php echo zget($lang->issue->severityList, $issue->severity);?>"><?php echo zget($lang->issue->severityList, $issue->severity);?></td>
|
||||
<td title="<?php echo $issue->pri;?>"><?php echo $issue->pri;?></td>
|
||||
<td title="<?php echo $issue->pri;?>" class="c-pri text-center"><span class="label-pri <?php echo 'label-pri-' . $issue->pri;?>"><?php echo $issue->pri;?></span></td>
|
||||
<td title="<?php echo zget($users, $issue->owner);?>"><?php echo zget($users, $issue->owner);?></td>
|
||||
<td title="<?php echo zget($lang->issue->statusList, $issue->status);?>"><?php echo zget($lang->issue->statusList, $issue->status);?></td>
|
||||
<?php $issue->createdDate = substr($issue->createdDate, 0, 10)?>
|
||||
|
||||
@@ -495,6 +495,8 @@ class weeklyModel extends model
|
||||
->fetch('consumed');
|
||||
}
|
||||
|
||||
if(is_null($AC)) $AC = 0;
|
||||
|
||||
return round($AC, 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ r($admin->create($wrongProductBug)) && c(400) && p('error') && e('product does n
|
||||
/* Test get. */
|
||||
$bug = $admin->create($normalBug);
|
||||
r($admin->get($bug->id)) && c(200) && p($fields) && e('Bug2');
|
||||
r($admin->get(9999999) && c(400) && p('error') && e('');
|
||||
r($admin->get(9999999)) && c(400) && p('error') && e('');
|
||||
r($noProduct1User->get($bug->id)) && c(403) && p('error') && e('');
|
||||
|
||||
r($admin->getList(1)) && c(200) && p('0:title') && e('Bug1');
|
||||
@@ -129,4 +129,4 @@ r($admin->put($modifyBug2)) && c(200) && p($fields) && e('Bug3');
|
||||
|
||||
/* Test delete*/
|
||||
r($admin->delete($bug->id)) && c(201) && p() && e('');
|
||||
r($admin->get($bug->id)) && c(200) && p('bug:deleted') && e('true');
|
||||
r($admin->get($bug->id)) && c(200) && p('bug:deleted') && e('true');
|
||||
|
||||
@@ -292,11 +292,11 @@ class buildTest
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param array $stories
|
||||
* @param innt $storyID
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function unlinkStoryTest($buildID, $stories = array(), $storyID)
|
||||
public function unlinkStoryTest($buildID, $stories = array(), $storyID = 0)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@ class customTest
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function updateURAndSRTest($key = 0, $SRName)
|
||||
public function updateURAndSRTest($key = 0, $SRName = '')
|
||||
{
|
||||
global $app, $tester;
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ class deptTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUsersTest($browseType = 'inside', $deptID = 0, $count, $orderBy = 'id', $pager = null)
|
||||
public function getUsersTest($browseType = 'inside', $deptID = 0, $count = 0, $orderBy = 'id', $pager = null)
|
||||
{
|
||||
$objects = $this->objectModel->getUsers($browseType, $deptID, $pager, $orderBy);
|
||||
|
||||
@@ -317,7 +317,7 @@ class deptTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDeptUserPairsTest($deptID = 0, $count, $key = 'account', $type = 'inside', $params = '')
|
||||
public function getDeptUserPairsTest($deptID = 0, $count = 0, $key = 'account', $type = 'inside', $params = '')
|
||||
{
|
||||
$objects = $this->objectModel->getDeptUserPairs($deptID, $key, $type, $params);
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class executionTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function createObject($param = array(), $project, $dayNum, $days)
|
||||
public function createObject($param = array(), $project = '', $dayNum = '', $days = '')
|
||||
{
|
||||
$products = array('');
|
||||
$plans = array('');
|
||||
@@ -748,6 +748,18 @@ class executionTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the privilege.
|
||||
*
|
||||
* @access public
|
||||
* @return string|bool
|
||||
*/
|
||||
public function getLimitedExecutionTest()
|
||||
{
|
||||
$this->objectModel->getProductGroupList();
|
||||
return isset($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* function getProductGroupList test execution
|
||||
*
|
||||
@@ -812,6 +824,19 @@ class executionTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the task data group by execution id list.
|
||||
*
|
||||
* @param array $executionIdList
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getTaskGroupByExecutionTest($executionIdList = array())
|
||||
{
|
||||
$objects = $this->objectModel->getTaskGroupByExecution($executionIdList);
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
/**
|
||||
* function getDefaultManagers test by execution
|
||||
*
|
||||
@@ -1486,7 +1511,7 @@ class executionTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getCanCopyObjectsTest($projectID = 0, $count)
|
||||
public function getCanCopyObjectsTest($projectID = 0, $count = 0)
|
||||
{
|
||||
$object = $this->objectModel->getCanCopyObjects($projectID);
|
||||
|
||||
@@ -1576,7 +1601,7 @@ class executionTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function addProjectMembersTest($projectID = 0, $executionID, $count)
|
||||
public function addProjectMembersTest($projectID = 0, $executionID = 0, $count = 0)
|
||||
{
|
||||
global $tester;
|
||||
$tester->dbh->query("delete from zt_team where root = $projectID");
|
||||
|
||||
@@ -104,10 +104,7 @@ class myTest
|
||||
$tester->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$actionID = $tester->loadModel('action')->create('task', 6, 'assigned', '', '', 'admin', '');
|
||||
$actionID = $tester->loadModel('action')->create('bug', 6, 'assigned', '', '', 'admin', '');
|
||||
$actionID = $tester->loadModel('action')->create('story', 5, 'assigned', '', '', 'admin', '');
|
||||
$objects = $this->objectModel->getAssignedByMe($account, $limit, $pager, $orderBy, $projectID, $objectType);
|
||||
$objects = $this->objectModel->getAssignedByMe($account, $limit, $pager, $orderBy, $objectType);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ class personnelTest
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addWhitelistTest($objectType = '', $objectID = 0, $user)
|
||||
public function addWhitelistTest($objectType = '', $objectID = 0, $user = '')
|
||||
{
|
||||
$users = array('accounts' => $user);
|
||||
foreach($users as $key => $value) $_POST[$key] = $value;
|
||||
|
||||
@@ -95,7 +95,7 @@ class releaseTest
|
||||
$files = array();
|
||||
$mailto = array();
|
||||
|
||||
$createFields = array('name' => '','marker' => '1', 'build' => '', 'date' => $date, 'desc' => '', 'mailto' => $mailto , 'labels' => $labels, 'files' => $files);
|
||||
$createFields = array('name' => '','marker' => '1', 'build' => '', 'date' => $date, 'desc' => '', 'mailto' => $mailto , 'labels' => $labels, 'files' => $files);
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
@@ -230,11 +230,12 @@ class releaseTest
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @param string $bugs
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function linkBugTest($releaseID, $type = 'bug', $bugs)
|
||||
public function linkBugTest($releaseID, $type = 'bug', $bugs = '')
|
||||
{
|
||||
$_POST['bugs'] = $bugs;
|
||||
$this->objectModel->linkBug($releaseID, $type);
|
||||
@@ -275,10 +276,11 @@ class releaseTest
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @param string $bugs
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function batchUnlinkBugTest($releaseID, $type = 'bug', $bugs)
|
||||
public function batchUnlinkBugTest($releaseID, $type = 'bug', $bugs = '')
|
||||
{
|
||||
$_POST['bugs'] = $bugs;
|
||||
$this->objectModel->linkBug($releaseID);
|
||||
|
||||
@@ -115,10 +115,11 @@ class storyTest
|
||||
* @param int $bugID
|
||||
* @param string $from
|
||||
* @param string $extra
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createTest($executionID = 0, $bugID = 0, $from = '', $extra = '', $params)
|
||||
public function createTest($executionID = 0, $bugID = 0, $from = '', $extra = '', $params = '')
|
||||
{
|
||||
$_POST = $params;
|
||||
$result = $this->objectModel->create($executionID, $bugID, $from, $extra);
|
||||
@@ -159,7 +160,7 @@ class storyTest
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchCreateTest($productID = 0, $branch = 0, $type = 'story', $params)
|
||||
public function batchCreateTest($productID = 0, $branch = 0, $type = 'story', $params = '')
|
||||
{
|
||||
$_POST = $params;
|
||||
$results = $this->objectModel->batchCreate($productID, $branch, $type);
|
||||
@@ -451,7 +452,7 @@ class storyTest
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchToTaskTest($executionID, $projectID = 0, $params)
|
||||
public function batchToTaskTest($executionID, $projectID = 0, $params = '')
|
||||
{
|
||||
$_POST = $params;
|
||||
$taskIdList = $this->objectModel->batchToTask($executionID, $projectID);
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->getLimitedExecution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取所有受限制的执行ID >> 1
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->getLimitedExecutionTest()) && p() && e('1'); // 获取所有受限制的执行ID
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->getTaskGroupByExecution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取所有受限制的执行ID >> 1
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$executionIdList = array(0, 1, 101, 131, 161);
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->getTaskGroupByExecutionTest()) && p() && e('0'); // 测试空数据
|
||||
r($execution->getTaskGroupByExecutionTest($executionIdList)) && p() && e('3'); // 测试获取执行的任务
|
||||
@@ -10,12 +10,12 @@ title=测试 myModel->getActions();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
正常查询action >> 32,,32,,这是一个系统日志测试备注32
|
||||
正常查询action统计 >> 5
|
||||
正常查询action >> 0
|
||||
正常查询action统计 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$my = new myTest();
|
||||
|
||||
r($my->getActionsTest()) && p('0:id,product,comment') && e('32,,32,,这是一个系统日志测试备注32');// 正常查询action
|
||||
r(count($my->getActionsTest())) && p() && e('5'); // 正常查询action统计
|
||||
r($my->getActionsTest()) && p() && e('0'); // 正常查询action
|
||||
r(count($my->getActionsTest())) && p() && e('0'); // 正常查询action统计
|
||||
@@ -13,7 +13,7 @@ pid=1
|
||||
|
||||
当插入一条action为admin指派了task的动态时,查询结果为1条数据 >> 1
|
||||
当插入一条action为admin指派了bug的动态时,查询结果为1条数据 >> 1
|
||||
当插入一条action为admin指派了需求的动态时,查询结果为1条数据 >> 1
|
||||
当插入一条action为admin指派了需求的动态时,查询结果为0条数据 >> 0
|
||||
|
||||
*/
|
||||
|
||||
@@ -24,6 +24,6 @@ $story = array('admin', 0, '', 'id_desc', 0, 'story');
|
||||
|
||||
r($my->getAssignedByMeTest($task[0], $task[1], $task[2], $task[3], $task[4], $task[5])) && p() && e('1'); // 当插入一条action为admin指派了task的动态时,查询结果为1条数据
|
||||
r($my->getAssignedByMeTest($bug[0], $bug[1], $bug[2], $bug[3], $bug[4], $bug[5])) && p() && e('1'); // 当插入一条action为admin指派了bug的动态时,查询结果为1条数据
|
||||
r($my->getAssignedByMeTest($story[0], $story[1], $story[2], $story[3], $story[4], $story[5])) && p() && e('1'); // 当插入一条action为admin指派了需求的动态时,查询结果为1条数据
|
||||
r($my->getAssignedByMeTest($story[0], $story[1], $story[2], $story[3], $story[4], $story[5])) && p() && e('0'); // 当插入一条action为admin指派了需求的动态时,查询结果为0条数据
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -18,6 +18,6 @@ $my = new myTest();
|
||||
$account = 'admin';
|
||||
$limit = 1;
|
||||
|
||||
$task = $my->getTasksBySearchTest($account[0], $limit);
|
||||
$task = $my->getTasksBySearchTest($account, $limit);
|
||||
|
||||
r($task) && p('913:name,status') && e('批量任务三,wait');//获取task状态的项目
|
||||
@@ -27,4 +27,4 @@ $cases2 = $my->getTestcasesBySearchTest(0, $type[1], $order);
|
||||
r($cases1) && p('560:title,status') && e('com.ngtesting.autotest.test.TestLogin账号过期,normal');//获取testcase状态的项目
|
||||
r(count($cases1)) && p() && e('20'); //获取testcase的统计
|
||||
r($cases2) && p('439:title,status') && e('com.ngtesting.autotest.test.TestLogin密码错误,normal');//获取testcase状态的项目
|
||||
r(count($cases2)) && p() && e('18'); //获取testcase的统计
|
||||
r(count($cases2)) && p() && e('18'); //获取testcase的统计
|
||||
@@ -20,7 +20,7 @@ $user = new userTest();
|
||||
$normalUser = array();
|
||||
$normalUser['account'] = array(1 => 'newtestuser1', 2 => 'newtestuser2', 3 => 'newtestuser3');
|
||||
$normalUser['realname'] = array(1 => '新测试用户1', 2 => '新测试用户2', 3 => '新测试用户3');
|
||||
$normalUser['visions'] = array(1 => 'rnd', 2 => 'rnd,lite', 3 => 'lite');
|
||||
$normalUser['visions'] = array(1 => array('rnd'), 2 => array('rnd','lite'), 3 => array('lite'));
|
||||
$normalUser['role'] = array(1 => 'qa', 2 => 'dev', 3 => 'pm');
|
||||
$normalUser['email'] = array(1 => 'testasd@163.com', 2 => '', 3 => '11773@qq.com');
|
||||
$normalUser['password'] = array(1 => 'e10adc3949ba59abbe56e057f20f883e', 2 => 'e10adc3949ba59abbe56e057f20f883e', 3 => 'e10adc3949ba59abbe56e057f20f883e');
|
||||
|
||||
Regular → Executable
+10
-10
@@ -10,11 +10,11 @@ title=测试 weeklyModel->getAC();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0,date值为2022-05-01 >> 4191
|
||||
测试project值为0,date值为空 >> 4191
|
||||
测试project值为11,date值为2022-05-01 >> 21
|
||||
测试project值为11,date值为空 >> 21
|
||||
测试project值为41,date值为2022-05-01 >> 42
|
||||
测试project值为0,date值为2022-05-01 >> 0
|
||||
测试project值为0,date值为空 >> 4209
|
||||
测试project值为11,date值为2022-05-01 >> 0
|
||||
测试project值为11,date值为空 >> 39
|
||||
测试project值为41,date值为2022-05-01 >> 0
|
||||
测试project值为41,date值为空 >> 42
|
||||
|
||||
*/
|
||||
@@ -23,9 +23,9 @@ $dateList = array('2022-05-01', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getACTest($projectList[0], $dateList[0])) && p() && e('4191'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[0], $dateList[1])) && p() && e('4191'); //测试project值为0,date值为空
|
||||
r($weekly->getACTest($projectList[1], $dateList[0])) && p() && e('21'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[1], $dateList[1])) && p() && e('21'); //测试project值为11,date值为空
|
||||
r($weekly->getACTest($projectList[2], $dateList[0])) && p() && e('42'); //测试project值为41,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[0], $dateList[0])) && p() && e('0'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[0], $dateList[1])) && p() && e('4209'); //测试project值为0,date值为空
|
||||
r($weekly->getACTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[1], $dateList[1])) && p() && e('39'); //测试project值为11,date值为空
|
||||
r($weekly->getACTest($projectList[2], $dateList[0])) && p() && e('0'); //测试project值为41,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[2], $dateList[1])) && p() && e('42'); //测试project值为41,date值为空
|
||||
@@ -10,10 +10,10 @@ title=测试 weeklyModel->getEV();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试projectID值为0,date值为2022-05-01 >> 771.55
|
||||
测试projectID值为0,date值为空 >> 2342.78
|
||||
测试projectID值为11,date值为2022-05-01 >> 15.3
|
||||
测试projectID值为11,date值为空 >> 54.18
|
||||
测试projectID值为0,date值为2022-05-01 >> 768.75
|
||||
测试projectID值为0,date值为空 >> 2347.38
|
||||
测试projectID值为11,date值为2022-05-01 >> 12.5
|
||||
测试projectID值为11,date值为空 >> 53.63
|
||||
测试projectID值为41,date值为2022-05-01 >> 6.91
|
||||
测试projectID值为41,date值为空 >> 19.87
|
||||
|
||||
@@ -23,9 +23,9 @@ $dateList = array('2022-05-01', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getEVTest($projectIDList[0], $dateList[0])) && p() && e('771.55'); //测试projectID值为0,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[0], $dateList[1])) && p() && e('2342.78'); //测试projectID值为0,date值为空
|
||||
r($weekly->getEVTest($projectIDList[1], $dateList[0])) && p() && e('15.3'); //测试projectID值为11,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[1], $dateList[1])) && p() && e('54.18'); //测试projectID值为11,date值为空
|
||||
r($weekly->getEVTest($projectIDList[0], $dateList[0])) && p() && e('768.75'); //测试projectID值为0,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[0], $dateList[1])) && p() && e('2347.38'); //测试projectID值为0,date值为空
|
||||
r($weekly->getEVTest($projectIDList[1], $dateList[0])) && p() && e('12.5'); //测试projectID值为11,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[1], $dateList[1])) && p() && e('53.63'); //测试projectID值为11,date值为空
|
||||
r($weekly->getEVTest($projectIDList[2], $dateList[0])) && p() && e('6.91'); //测试projectID值为41,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[2], $dateList[1])) && p() && e('19.87'); //测试projectID值为41,date值为空
|
||||
@@ -10,16 +10,15 @@ title=测试 weeklyModel->getLastDay();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询日期为星期日 >> 2022-05-07
|
||||
查询日期为其他 >> 2022-05-01
|
||||
查询日期为空 >> 2022-05-10
|
||||
查询日期为星期日 >> 2022-05-06
|
||||
查询日期为其他 >> 2022-04-29
|
||||
查询日期为空 >> 2022-08-29
|
||||
|
||||
*/
|
||||
|
||||
$date = array('2022-05-08', '2022-04-29', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getLastDayTest($date[0])) && p() && e('2022-05-07'); //查询日期为星期日
|
||||
r($weekly->getLastDayTest($date[1])) && p() && e('2022-05-01'); //查询日期为其他
|
||||
r($weekly->getLastDayTest($date[2])) && p() && e('2022-05-10'); //查询日期为空
|
||||
r($weekly->getLastDayTest($date[0])) && p() && e('2022-05-06'); //查询日期为星期日
|
||||
r($weekly->getLastDayTest($date[1])) && p() && e('2022-04-29'); //查询日期为其他
|
||||
r($weekly->getLastDayTest($date[2])) && p() && e('2022-08-29'); //查询日期为空
|
||||
@@ -1,4 +1,4 @@
|
||||
usr/bin/env php
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/weekly.class.php';
|
||||
@@ -24,8 +24,8 @@ $productID = array('19', '13', '17', '18');
|
||||
$date = array('2022-05-07', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
r($weekly->getPageNavTest($productID[0], $date[0])) && p() && e('周报-项目9'); //查询项目为未开始,日期为当天的数据
|
||||
r($weekly->getPageNavTest($productID[0], $date[1])) && p() && e('周报-项目9'); //查询项目为未开始,日期为一周前的数据
|
||||
r($weekly->getPageNavTest($productID[0], $date[0])) && p() && e('周报-项目9'); //查询项目为未开始,日期为当天的数据
|
||||
r($weekly->getPageNavTest($productID[0], $date[1])) && p() && e('周报-项目9'); //查询项目为未开始,日期为一周前的数据
|
||||
r($weekly->getPageNavTest($productID[1], $date[0])) && p() && e('周报-项目3'); //查询项目为进行中,日期为当天的数据
|
||||
r($weekly->getPageNavTest($productID[1], $date[1])) && p() && e('周报-项目3'); //查询项目为进行中,日期为一周前的数据
|
||||
r($weekly->getPageNavTest($productID[2], $date[0])) && p() && e('周报-项目7'); //查询项目为已挂起,日期为当天的数据
|
||||
|
||||
@@ -11,11 +11,11 @@ cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0,date值为2022-05-01 >> 子任务5
|
||||
测试project值为0,date值为空 >> 开发任务610
|
||||
测试project值为0,date值为空 >> 0
|
||||
测试project值为1,date值为2022-05-01 >> 0
|
||||
测试project值为1,date值为空 >> 0
|
||||
测试project值为11,date值为2022-05-01 >> 开发任务11
|
||||
测试project值为11,date值为空 >> 开发任务11
|
||||
测试project值为11,date值为空 >> 0
|
||||
|
||||
*/
|
||||
$projectList = array(0, 1, 11);
|
||||
@@ -24,8 +24,8 @@ $dateList = array('2022-05-01', '');
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[0], $dateList[0])) && p('905:name') && e('子任务5'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[0], $dateList[1])) && p('600:name') && e('开发任务610'); //测试project值为0,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-05-01
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[0], $dateList[1])) && p('600:name') && e('0'); //测试project值为0,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-05-01
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[2], $dateList[0])) && p('1:name') && e('开发任务11'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[2], $dateList[1])) && p('1:name') && e('开发任务11'); //测试project值为11,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[2], $dateList[1])) && p('1:name') && e('0'); //测试project值为11,date值为空
|
||||
@@ -10,22 +10,22 @@ title=测试 weeklyModel->getPostponed();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0,date值为2022-05-01 >> 子任务4
|
||||
测试project值为0,date值为空 >> 开发任务608
|
||||
测试project值为1,date值为2022-05-01 >> 0
|
||||
测试project值为0,date值为2022-07-30 >> 更多任务202
|
||||
测试project值为0,date值为空 >> 0
|
||||
测试project值为1,date值为2022-07-30 >> 0
|
||||
测试project值为1,date值为空 >> 0
|
||||
测试project值为11,date值为2022-05-01 >> 开发任务101
|
||||
测试project值为11,date值为空 >> 开发任务461
|
||||
测试project值为11,date值为2022-07-30 >> 更多任务272
|
||||
测试project值为11,date值为空 >> 0
|
||||
|
||||
*/
|
||||
$projectList = array(0, 1, 11);
|
||||
$dateList = array('2022-05-01', '');
|
||||
$dateList = array('2022-07-30', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getPostponedTest($projectList[0], $dateList[0])) && p('92:name') && e('子任务4'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getPostponedTest($projectList[0], $dateList[1])) && p('56:name') && e('开发任务608'); //测试project值为0,date值为空
|
||||
r($weekly->getPostponedTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-05-01
|
||||
r($weekly->getPostponedTest($projectList[0], $dateList[0])) && p('92:name') && e('更多任务202'); //测试project值为0,date值为2022-07-30
|
||||
r($weekly->getPostponedTest($projectList[0], $dateList[1])) && p('56:name') && e('0'); //测试project值为0,date值为空
|
||||
r($weekly->getPostponedTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-07-30
|
||||
r($weekly->getPostponedTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getPostponedTest($projectList[2], $dateList[0])) && p('5:name') && e('开发任务101'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getPostponedTest($projectList[2], $dateList[1])) && p('1:name') && e('开发任务461'); //测试project值为11,date值为空
|
||||
r($weekly->getPostponedTest($projectList[2], $dateList[0])) && p('2:name') && e('更多任务272'); //测试project值为11,date值为2022-07-30
|
||||
r($weekly->getPostponedTest($projectList[2], $dateList[1])) && p('1:name') && e('0'); //测试project值为11,date值为空
|
||||
@@ -10,23 +10,22 @@ title=测试 weeklyModel->getTasksOfNextWeek();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0,date值为2022-05-01 >> 子任务10
|
||||
测试project值为0,date值为空 >> 开发任务606
|
||||
测试project值为1,date值为2022-05-01 >> 0
|
||||
测试project值为0,date值为2022-07-30 >> 子任务6
|
||||
测试project值为0,date值为空 >> 0
|
||||
测试project值为1,date值为2022-07-30 >> 0
|
||||
测试project值为1,date值为空 >> 0
|
||||
测试project值为11,date值为2022-05-01 >> 开发任务551
|
||||
测试project值为11,date值为空 >> 开发任务11
|
||||
测试project值为11,date值为2022-07-30 >> 开发任务371
|
||||
测试project值为11,date值为空 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$projectList = array(0, 1, 11);
|
||||
$dateList = array('2022-05-01', '');
|
||||
$dateList = array('2022-07-30', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[0], $dateList[0])) && p('910:name') && e('子任务10'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[0], $dateList[1])) && p('596:name') && e('开发任务606'); //测试project值为0,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-05-01
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[2], $dateList[0])) && p('541:name') && e('开发任务551'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[2], $dateList[1])) && p('1:name') && e('开发任务11'); //测试project值为11,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[0], $dateList[0])) && p('906:name') && e('子任务6'); //测试project值为0,date值为2022-07-30
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[0], $dateList[1])) && p() && e('0'); //测试project值为0,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-07-30
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[2], $dateList[0])) && p('361:name') && e('开发任务371'); //测试project值为11,date值为2022-07-30
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[2], $dateList[1])) && p() && e('0'); //测试project值为11,date值为空
|
||||
@@ -12,13 +12,13 @@ pid=1
|
||||
|
||||
查询日期为星期日 >> 2022-05-02
|
||||
查询日期为其他 >> 2022-04-25
|
||||
查询日期为空 >> 2022-05-04
|
||||
查询日期为空 >> 2022-03-21
|
||||
|
||||
*/
|
||||
$date = array('2022-05-08', '2022-04-29', '');
|
||||
$date = array('2022-05-08', '2022-04-29', '2022-03-25');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getThisMondayTest($date[0])) && p() && e('2022-05-02'); //查询日期为星期日
|
||||
r($weekly->getThisMondayTest($date[1])) && p() && e('2022-04-25'); //查询日期为其他
|
||||
r($weekly->getThisMondayTest($date[2])) && p() && e('2022-05-04'); //查询日期为空
|
||||
r($weekly->getThisMondayTest($date[2])) && p() && e('2022-03-21'); //查询日期为空
|
||||
@@ -12,13 +12,13 @@ pid=1
|
||||
|
||||
查询日期为星期日 >> 2022-05-08
|
||||
查询日期为其他 >> 2022-05-01
|
||||
查询日期为空 >> 2022-05-10
|
||||
查询日期为空 >> 2022-03-06
|
||||
|
||||
*/
|
||||
$date = array('2022-05-08', '2022-04-29', '');
|
||||
$date = array('2022-05-08', '2022-04-29', '2022-03-01');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getThisSundayTest($date[0])) && p() && e('2022-05-08'); //查询日期为星期日
|
||||
r($weekly->getThisSundayTest($date[1])) && p() && e('2022-05-01'); //查询日期为其他
|
||||
r($weekly->getThisSundayTest($date[2])) && p() && e('2022-05-10'); //查询日期为空
|
||||
r($weekly->getThisSundayTest($date[2])) && p() && e('2022-03-06'); //查询日期为空
|
||||
@@ -10,9 +10,9 @@ title=测试 weeklyModel->getWorkloadByType();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0 >> 574.00,568.00,563.00,556.00,557.00,571.00,563.00,566.00
|
||||
测试project值为0 >> 577.00,568.00,563.00,556.00,557.00,571.00,563.00,566.00
|
||||
测试project值为1 >> 0
|
||||
测试project值为11 >> 24.00,11.00,16.00,3.00,9.00,5.00,18.00,14.00
|
||||
测试project值为11 >> 27.00,11.00,16.00,3.00,9.00,5.00,18.00,14.00
|
||||
测试project值为41 >> 13.00,12.00,3.00,7.00
|
||||
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ $projectList = array(0, 1, 11, 41);
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getWorkloadByTypeTest($projectList[0])) && p('design,devel,test,study,discuss,ui,affair,misc') && e('574.00,568.00,563.00,556.00,557.00,571.00,563.00,566.00'); //测试project值为0
|
||||
r($weekly->getWorkloadByTypeTest($projectList[0])) && p('design,devel,test,study,discuss,ui,affair,misc') && e('577.00,568.00,563.00,556.00,557.00,571.00,563.00,566.00'); //测试project值为0
|
||||
r($weekly->getWorkloadByTypeTest($projectList[1])) && p() && e('0'); //测试project值为1
|
||||
r($weekly->getWorkloadByTypeTest($projectList[2])) && p('design,devel,test,study,discuss,ui,affair,misc') && e('24.00,11.00,16.00,3.00,9.00,5.00,18.00,14.00'); //测试project值为11
|
||||
r($weekly->getWorkloadByTypeTest($projectList[2])) && p('design,devel,test,study,discuss,ui,affair,misc') && e('27.00,11.00,16.00,3.00,9.00,5.00,18.00,14.00'); //测试project值为11
|
||||
r($weekly->getWorkloadByTypeTest($projectList[3])) && p('affair,test,study,discuss') && e('13.00,12.00,3.00,7.00'); //测试project值为41
|
||||
@@ -181,6 +181,9 @@ switch($argv[1])
|
||||
case 'user':
|
||||
ztfRun('model/user');
|
||||
break;
|
||||
case 'weekly':
|
||||
ztfRun('model/weekly');
|
||||
break;
|
||||
case 'gitlab':
|
||||
ztfRun('model/gitlab');
|
||||
break;
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* ZUI: ZUI for Zentao - v1.10.0 - 2022-08-24
|
||||
* ZUI: ZUI for Zentao - v1.10.0 - 2022-08-30
|
||||
* http://openzui.com
|
||||
* GitHub: https://github.com/easysoft/zui.git
|
||||
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user