Merge branch 'sprint/231_zg_issues'

This commit is contained in:
wangyidong
2022-08-26 09:36:15 +08:00
27 changed files with 72 additions and 34 deletions
+12 -1
View File
@@ -235,7 +235,18 @@
</tr>
<tr>
<th><?php echo $lang->story->legendMailto;?></th>
<td><?php $mailto = explode(',', $story->mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "<span>" . zget($users, trim($account)) . '</span> &nbsp;'; }?></td>
<td>
<?php
if(!empty($story->mailto))
{
foreach(explode(',', $story->mailto) as $account)
{
if(empty($account)) continue;
echo "<span>" . zget($users, trim($account)) . '</span> &nbsp;';
}
}
?>
</td>
</tr>
</tbody>
</table>
+1
View File
@@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed';
$lang->bug->changed = 'Changed';
$lang->bug->storyChanged = 'Story Changed';
$lang->bug->linkMR = 'Related MRs';
$lang->bug->duplicateTip = 'Please enter keyword search';
/* Page tags. */
$lang->bug->lblAssignedTo = 'Bearbeiter';
+2 -1
View File
@@ -77,7 +77,7 @@ $lang->bug->deadlineAB = 'Deadline';
$lang->bug->plan = 'Plan';
$lang->bug->closedBy = 'ClosedBy';
$lang->bug->closedDate = 'ClosedDate';
$lang->bug->duplicateBug = 'Duplicated Bug ID';
$lang->bug->duplicateBug = 'Duplicated Bug';
$lang->bug->lastEditedBy = 'EditedBy';
$lang->bug->linkBug = 'Linked Bugs';
$lang->bug->linkBugs = 'Link Bug';
@@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed';
$lang->bug->changed = 'Changed';
$lang->bug->storyChanged = 'Story Changed';
$lang->bug->linkMR = 'Related MRs';
$lang->bug->duplicateTip = 'Please enter keyword search';
/* Page tags. */
$lang->bug->lblAssignedTo = 'AssignTo';
+2 -1
View File
@@ -77,7 +77,7 @@ $lang->bug->deadlineAB = 'Butoir';
$lang->bug->plan = 'Plan';
$lang->bug->closedBy = 'Fermé par';
$lang->bug->closedDate = 'Date Fermeture';
$lang->bug->duplicateBug = 'Bug ID en doublon';
$lang->bug->duplicateBug = 'Bug en doublon';
$lang->bug->lastEditedBy = 'Edité par';
$lang->bug->linkBug = 'Bugs Liés';
$lang->bug->linkBugs = 'Associer Bug';
@@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed';
$lang->bug->changed = 'Changed';
$lang->bug->storyChanged = 'Story Changed';
$lang->bug->linkMR = 'Related MRs';
$lang->bug->duplicateTip = 'Please enter keyword search';
/* Page tags. */
$lang->bug->lblAssignedTo = 'Affecté à';
+2 -1
View File
@@ -77,7 +77,7 @@ $lang->bug->deadlineAB = '截止';
$lang->bug->plan = '所属' . '计划';
$lang->bug->closedBy = '由谁关闭';
$lang->bug->closedDate = '关闭日期';
$lang->bug->duplicateBug = '重复ID';
$lang->bug->duplicateBug = '重复Bug';
$lang->bug->lastEditedBy = '最后修改者';
$lang->bug->linkBug = '相关Bug';
$lang->bug->linkBugs = '关联相关Bug';
@@ -176,6 +176,7 @@ $lang->bug->labelPostponed = '被延期';
$lang->bug->changed = '已变动';
$lang->bug->storyChanged = '需求变动';
$lang->bug->linkMR = '相关合并请求';
$lang->bug->duplicateTip = '请输入关键字';
/* 页面标签。*/
$lang->bug->lblAssignedTo = '当前指派';
+1 -1
View File
@@ -143,7 +143,7 @@
<tr>
<td class='pd-0'><?php echo html::select("resolutions[$bugID]", $resolutionList, $bug->resolution, "class='form-control' onchange=setDuplicate(this.value,$bugID)");?></td>
<td class='pd-0 w-p50' id='<?php echo 'duplicateBugBox' . $bugID;?>' <?php if($bug->resolution != 'duplicate') echo "style='display:none'";?>>
<?php echo html::select("duplicateBugs[$bugID]", $productBugList[$bug->product][$bug->branch], $bug->duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateBug}'");?>
<?php echo html::select("duplicateBugs[$bugID]", $productBugList[$bug->product][$bug->branch], $bug->duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?>
</td>
</tr>
</table>
+1 -1
View File
@@ -265,7 +265,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
</tr>
<tr id='duplicateBugBox' <?php if($bug->resolution != 'duplicate') echo "style='display:none'";?>>
<th><?php echo $lang->bug->duplicateBug;?></th>
<td><?php echo html::select('duplicateBug', $productBugs, $bug->duplicateBug, "class='form-control'");?></td>
<td><?php echo html::select('duplicateBug', $productBugs, $bug->duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->closedBy;?></th>
+1 -1
View File
@@ -38,7 +38,7 @@ js::set('productID' , $bug->product);
</tr>
<tr id='duplicateBugBox' class='hide'>
<th><?php echo $lang->bug->duplicateBug;?></th>
<td class='required'><?php echo html::select('duplicateBug', $productBugs, '', "class='form-control'");?></td>
<td class='required'><?php echo html::select('duplicateBug', $productBugs, '', "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->resolvedBuild;?></th>
+8 -1
View File
@@ -262,7 +262,14 @@
</tr>
<tr>
<th><?php echo $lang->bug->mailto;?></th>
<td><?php $mailto = explode(',', str_replace(' ', '', $bug->mailto)); foreach($mailto as $account) echo ' ' . zget($users, $account); ?></td>
<td>
<?php
if(empty($bug->mailto))
{
foreach(explode(',', str_replace(' ', '', $bug->mailto)) as $account) echo ' ' . zget($users, $account);
}
?>
</td>
</tr>
</tbody>
</table>
+1
View File
@@ -314,6 +314,7 @@ class file extends control
$this->view->files = $files;
$this->view->fieldset = $fieldset;
$this->view->object = $object;
$this->view->method = $method;
if($method == 'view') return $this->display('file', 'viewfiles');
$this->display();
+1 -1
View File
@@ -92,7 +92,7 @@
if(common::hasPriv($objectType, 'edit', $object))
{
echo "<span class='right-icon'>&nbsp; ";
common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'");
if($method != 'storyChange') common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'");
if(common::hasPriv('file', 'delete')) echo html::a('###', $lang->delete, '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id)' title='$lang->delete'");
echo '</span>';
}
+4 -4
View File
@@ -90,10 +90,10 @@
</td>
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td class='c-name nobr <?php if(!empty($story->children)) echo "has-child" ?>'>
<?php echo common::hasPriv('requirement', 'view') ? html::a($storyLink, $story->title, null, "style='color: $story->color' data-group='product'") : "<span title='$story->title'>$story->title</span>";?>
<?php echo common::hasPriv('requirement', 'view') ? html::a($storyLink, $story->title, null, "style='color: $story->color' data-group='product' title='$story->title'") : "<span title='$story->title'>$story->title</span>";?>
<?php if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';?>
</td>
<td class='c-product'><?php echo $story->productTitle;?></td>
<td class='c-product' title="<?php echo $story->productTitle;?>"><?php echo $story->productTitle;?></td>
<td class='c-user'><?php echo zget($users, $story->openedBy);?></td>
<td class='c-hours' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td class='c-status'><span class='status-story status-<?php echo $story->status;?>'> <?php echo $this->processStatus('story', $story);?></span></td>
@@ -133,9 +133,9 @@
</td>
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $child->pri;?>' title='<?php echo zget($lang->story->priList, $child->pri, $child->pri);?>'><?php echo zget($lang->story->priList, $child->pri, $child->pri);?></span></td>
<td class='c-name nobr'>
<?php echo '<span class="label label-badge label-light" title="' . $this->lang->story->children .'">SR</span> ' . (common::hasPriv('story', 'view') ? html::a($storyLink, $child->title, null, "style='color: $child->color' data-group='product'") : $child->title);?>
<?php echo '<span class="label label-badge label-light" title="' . $this->lang->story->children .'">SR</span> ' . (common::hasPriv('story', 'view') ? html::a($storyLink, $child->title, null, "style='color: $child->color' data-group='product' title='$child->title'") : $child->title);?>
</td>
<td class='c-product'><?php echo $child->productTitle;?></td>
<td class='c-product' title="<?php echo $child->productTitle;?>"><?php echo $child->productTitle;?></td>
<td class='c-user'><?php echo zget($users, $child->openedBy);?></td>
<td class='c-hours'><?php echo $child->estimate . $config->hourUnit;?></td>
<td class='c-status'><?php echo $child->URChanged ? "<span class='status-story status-changed'>{$this->lang->story->URChanged}</span>" : "<span class='status-story status-$child->status'>" . $this->processStatus('story', $child) . '</span>'?></td>
+3
View File
@@ -747,6 +747,7 @@ class story extends control
*/
public function edit($storyID, $kanbanGroup = 'default', $storyType = 'story')
{
$this->app->loadLang('bug');
$story = $this->story->getById($storyID, 0, true);
if(!empty($_POST))
@@ -1611,6 +1612,7 @@ class story extends control
*/
public function close($storyID, $from = '', $storyType = 'story')
{
$this->app->loadLang('bug');
$story = $this->story->getById($storyID);
if(!empty($_POST))
@@ -1712,6 +1714,7 @@ class story extends control
*/
public function batchClose($productID = 0, $executionID = 0, $storyType = 'story', $from = '')
{
$this->app->loadLang('bug');
if(!$this->post->storyIdList) return print(js::locate($this->session->storyList, 'parent'));
$storyIdList = $this->post->storyIdList;
$storyIdList = array_unique($storyIdList);
+1 -1
View File
@@ -155,7 +155,7 @@ $lang->story->childrenAB = "C";
$lang->story->linkStories = 'Story verknüpfen';
$lang->story->linkRequirements = "Linked {$lang->URCommon}";
$lang->story->childStories = 'Story aufteilen';
$lang->story->duplicateStory = 'Story ID kopieren';
$lang->story->duplicateStory = 'Story kopieren';
$lang->story->reviewResult = 'Ergbnis prüfen';
$lang->story->reviewResultAB = 'Bewertungsergebnisse';
$lang->story->preVersion = 'Frühere Version';
+1 -1
View File
@@ -155,7 +155,7 @@ $lang->story->childrenAB = "C";
$lang->story->linkStories = 'Linked Story';
$lang->story->linkRequirements = "Linked {$lang->URCommon}";
$lang->story->childStories = 'Decomposed Story';
$lang->story->duplicateStory = 'Duplicated Story ID';
$lang->story->duplicateStory = 'Duplicated Story';
$lang->story->reviewResult = 'Review Result';
$lang->story->reviewResultAB = 'Assessment results';
$lang->story->preVersion = 'Last Version';
+1 -1
View File
@@ -155,7 +155,7 @@ $lang->story->childrenAB = "C";
$lang->story->linkStories = 'Stories Liées';
$lang->story->linkRequirements = "{$lang->URCommon} Lié es";
$lang->story->childStories = 'Stories Décomposées';
$lang->story->duplicateStory = 'Story ID Dupliquées';
$lang->story->duplicateStory = 'Story Dupliquées';
$lang->story->reviewResult = 'Résultat Validation';
$lang->story->reviewResultAB = 'Résultats de lévaluation';
$lang->story->preVersion = 'Dernière Version';
+2 -2
View File
@@ -154,8 +154,8 @@ $lang->story->children = "子需求";
$lang->story->childrenAB = "子";
$lang->story->linkStories = "相关{$lang->SRCommon}";
$lang->story->linkRequirements = "相关{$lang->URCommon}";
$lang->story->childStories = "细分需求";
$lang->story->duplicateStory = "重复需求ID";
$lang->story->childStories = "细分{$lang->SRCommon}";
$lang->story->duplicateStory = "重复{$lang->SRCommon}";
$lang->story->reviewResult = '评审意见';
$lang->story->reviewResultAB = '评审结果';
$lang->story->preVersion = '之前版本';
+1 -1
View File
@@ -784,7 +784,7 @@ class storyModel extends model
return false;
}
if($this->checkForceReview() and empty($_POST['reviewer']))
if(strpos('draft,changing', $oldStory->status) !== false and $this->checkForceReview() and empty($_POST['reviewer']))
{
dao::$errors[] = $this->lang->story->errorEmptyReviewedBy;
return false;
+1 -1
View File
@@ -44,7 +44,7 @@
<?php echo html::select("closedReasons[$storyID]", $reasonList, 'done', "class=form-control onchange=setDuplicateAndChild(this.value,$storyID) style='min-width: 80px'");?>
</td>
<td class='pd-0 w-p40 required' id='<?php echo 'duplicateStoryBox' . $storyID;?>' <?php if($story->closedReason != 'duplicate') echo "style='display:none'";?>>
<?php echo html::select("duplicateStoryIDList[$storyID]", $productStoryList[$story->product][$story->branch], $story->duplicateStory, "class='form-control' placeholder='{$lang->idAB}'");?>
<?php echo html::select("duplicateStoryIDList[$storyID]", array('' => '') + $productStoryList[$story->product][$story->branch], $story->duplicateStory ? $story->duplicateStory : '', "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?>
</td>
<td class='pd-0' id='<?php echo 'childStoryBox' . $storyID;?>' <?php if($story->closedReason != 'subdivided') echo "style='display:none'";?>>
<?php echo html::input("childStoriesIDList[$storyID]", '', "class='form-control' placeholder='{$lang->idAB}'");?>
+1 -1
View File
@@ -68,7 +68,7 @@
<tr>
<th><?php echo $lang->attatch;?></th>
<td>
<?php echo $this->fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'true', 'object' => $story, 'method' => 'change'));?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'true', 'object' => $story, 'method' => 'storyChange'));?>
<?php echo $this->fetch('file', 'buildform');?>
</td>
</tr>
+1 -1
View File
@@ -30,7 +30,7 @@
</tr>
<tr id='duplicateStoryBox' style='display:none'>
<th><?php echo $lang->story->duplicateStory;?></th>
<td class='required'><?php echo html::select('duplicateStory', $productStories, '', 'class="form-control"'); ?></td><td></td>
<td class='required'><?php echo html::select('duplicateStory', array('' => '') + $productStories, '', "class='form-control' placeholder='{$lang->bug->duplicateTip}'"); ?></td><td></td>
</tr>
<tr id='childStoriesBox' style='display:none'>
<th><?php echo $lang->story->childStories;?></th>
+1 -1
View File
@@ -285,7 +285,7 @@
<table class='table table-form'>
<tr id='duplicateStoryBox'>
<th class='w-90px'><?php echo $lang->story->duplicateStory;?></th>
<td><?php echo html::select('duplicateStory', $productStories, $story->duplicateStory, 'class="form-control"'); ?></td>
<td><?php echo html::select('duplicateStory', array('' => '') + $productStories, $story->duplicateStory ? $story->duplicateStory : '', "class='form-control' placeholder='{$lang->bug->duplicateTip}'"); ?></td>
</tr>
<tr class='text-top'>
<th class='thWidth'><?php echo $story->type == 'story' ? $lang->requirement->linkStory : $lang->story->linkStory;?></th>
+12 -1
View File
@@ -326,7 +326,18 @@
</tr>
<tr>
<th><?php echo $lang->story->legendMailto;?></th>
<td><?php $mailto = explode(',', $story->mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "<span>" . zget($users, trim($account)) . '</span> &nbsp;'; }?></td>
<td>
<?php
if(!empty($story->mailto))
{
foreach(explode(',', $story->mailto) as $account)
{
if(empty($account)) continue;
echo "<span>" . zget($users, trim($account)) . '</span> &nbsp;';
}
}
?>
</td>
</tr>
</tbody>
</table>
+1 -1
View File
@@ -1087,7 +1087,7 @@ class userModel extends model
if(!$stmt) return array('rights' => $rights, 'acls' => $acls);
while($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
$rights[strtolower($row['module'])][strtolower($row['method'])] = true;
if($row['module'] and $row['method']) $rights[strtolower($row['module'])][strtolower($row['method'])] = true;
}
/* Get can manage projects by user. */
+4 -3
View File
@@ -3,9 +3,10 @@ class todoTest
{
public function __construct()
{
global $tester;
$this->objectModel = $tester->loadModel('todo');
$tester->app->loadClass('dao');
global $tester;
$this->objectModel = $tester->loadModel('todo');
$tester->app->loadClass('dao');
$_SERVER['HTTP_HOST'] = 'test.zentao.net';
}
/**
+5 -5
View File
@@ -23,8 +23,8 @@ $descs = array('desc1', 'desc2', 'desc3', 'desc4', '' , '', '', '');
$begins = array('0830', '0900', '0930', '1000', '1030', '1100', '1130', '1200');
$ends = array('0900', '0930', '1000','1030', '1100', '1130', '1200', '1230');
$bugs = array('2' => '313');
$noname_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends);
$assignedTos = array('user1', 'ditto', 'ditto', 'ditto', 'ditto', 'ditto', 'ditto', 'ditto',);
$noname_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends, 'assignedTos' => $assignedTos);
$names = array('批量创建待办4','批量创建待办5','批量创建待办6', '批量创建待办7', '', '', '', '');
$types = array('bug', 'story', 'task', 'testtask', 'custom', 'custom', 'custom', 'custom');
@@ -33,10 +33,10 @@ $stories = array('2' => '1');
$tasks = array('3' => '1');
$testtasks = array('4' => '1');
$except_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends, 'bugs' => $bugs, 'stories' => $stories, 'tasks' => $tasks, 'testtasks' => $testtasks);
$except_create = array('types' => $types, 'pris' => $pris, 'names' => $names, 'descs' => $descs, 'begins' => $begins, 'ends' => $ends, 'bugs' => $bugs, 'stories' => $stories, 'tasks' => $tasks, 'testtasks' => $testtasks, 'assignedTos' => $assignedTos);
$todo = new todoTest();
r($todo->batchCreateTest($noname_create)) && p('2006:name,desc,pri,type,idvalue;2007:name,desc,pri,type,idvalue;2008:name,desc,pri,type,idvalue') && e('批量创建待办1,desc1,1,custom,0;批量创建待办2,desc2,2,custom,0;批量创建待办3,desc4,4,custom,0'); // 批量创建有个没有名字的待办
r($todo->batchCreateTest($except_create)) && p('2009:name,desc,pri,type,idvalue;2010:name,desc,pri,type,idvalue;2011:name,desc,pri,type,idvalue;2012:name,desc,pri,type,idvalue') && e('测试单转Bug13,desc1,1,bug,313;用户需求版本一61,desc2,2,story,1;开发任务11,desc3,3,task,1;测试单1,desc4,4,testtask,1'); // 批量创建的待办
$db->restoreDB();
r($todo->batchCreateTest($except_create)) && p('2009:name,desc,pri,type,idvalue;2010:name,desc,pri,type,idvalue;2011:name,desc,pri,type,idvalue;2012:name,desc,pri,type,idvalue') && e('测试单转Bug13,desc1,1,bug,313;软件需求版本一551,desc2,2,story,1;开发任务11,desc3,3,task,1;测试单1,desc4,4,testtask,1'); // 批量创建的待办
$db->restoreDB();
+1 -1
View File
@@ -32,4 +32,4 @@ $todo = new todoTest();
r($todo->batchUpdateTest($changeType, '3')) && p('0:field,old,new') && e('type,task,custom'); // 批量修改todo类型
r($todo->batchUpdateTest($changePri, '2')) && p('0:field,old,new') && e('pri,2,1'); // 批量修改todo优先级
r($todo->batchUpdateTest($changeStatus, '1')) && p('0:field,old,new') && e('status,wait,doing'); // 批量修改todo状态
$db->restoreDB();
$db->restoreDB();