* Finish task #44367.

This commit is contained in:
liyuchun
2021-11-16 17:25:30 +08:00
parent 161b76d10c
commit b5cfba165e
8 changed files with 55 additions and 16 deletions

View File

@@ -94,3 +94,7 @@ INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VA
('all','stage','typeList','release','发布', '1'),
('all','stage','typeList','review','总结评审','1'),
('all','stage','typeList','other','其他','1');
ALTER TABLE `zt_bug`
ADD `feedbackBy` varchar(100) NOT NULL AFTER `activatedDate`,
ADD `notifyEmail` varchar(100) NOT NULL AFTER `feedbackBy`;

View File

@@ -45,3 +45,6 @@ html[lang='en'] #deadlineTd .input-group-addon {padding: 5px 18px;}
#osBox .required:after {right: 1px;}
#osBox {width: 190px;}
#projectBox .required:after {right: 1px;}
#assignedTo_chosen {width: 153px !important; float: left;}
#assignedBox .load-all-user {float: left;}
#assignedBox .load-all-user .btn {border-left: none;}

View File

@@ -48,6 +48,8 @@ $lang->bug->confirmed = 'Confirmed';
$lang->bug->confirmedAB = 'C';
$lang->bug->toTask = 'Convert to Task';
$lang->bug->toStory = 'Convert to Story';
$lang->bug->feedbackBy = 'Feedback By';
$lang->bug->notifyEmail = 'Notify Email';
$lang->bug->mailto = 'Mailto';
$lang->bug->openedBy = 'ReportedBy';
$lang->bug->openedByAB = 'Reporter';

View File

@@ -48,6 +48,8 @@ $lang->bug->confirmed = '是否确认';
$lang->bug->confirmedAB = '确认';
$lang->bug->toTask = '转任务';
$lang->bug->toStory = "{$lang->SRCommon}";
$lang->bug->feedbackBy = '反馈者';
$lang->bug->notifyEmail = '通知邮箱';
$lang->bug->mailto = '抄送给';
$lang->bug->openedBy = '由谁创建';
$lang->bug->openedByAB = '创建者';

View File

@@ -85,7 +85,12 @@ class bugModel extends model
/* Use classic mode to replace required project. */
if($this->config->systemMode == 'classic' and strpos($this->config->bug->create->requiredFields, 'project') !== false) $this->config->bug->create->requiredFields = str_replace('project', 'execution', $this->config->bug->create->requiredFields);
$this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec();
$this->dao->insert(TABLE_BUG)->data($bug)
->autoCheck()
->checkIF($bug->notifyEmail, 'notifyEmail', 'email')
->batchCheck($this->config->bug->create->requiredFields, 'notempty')
->exec();
if(!dao::isError())
{
$bugID = $this->dao->lastInsertID();
@@ -658,6 +663,7 @@ class bugModel extends model
->batchCheck($this->config->bug->edit->requiredFields, 'notempty')
->checkIF($bug->resolvedBy, 'resolution', 'notempty')
->checkIF($bug->closedBy, 'resolution', 'notempty')
->checkIF($bug->notifyEmail, 'notifyEmail', 'email')
->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty')
->checkIF($bug->resolution == 'fixed', 'resolvedBuild','notempty')
->where('id')->eq((int)$bugID)

View File

@@ -129,21 +129,31 @@ js::set('moduleID', $moduleID);
<tr>
<th><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
<td>
<div class='input-group'>
<div class='table-row'>
<div class='table-col' id='assignedBox'>
<?php echo html::select('assignedTo', $productMembers, $assignedTo, "class='form-control chosen'");?>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
<span class='input-group-btn load-all-user'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
</div>
</td>
<?php $showDeadline = strpos(",$showFields,", ',deadline,') !== false;?>
<?php if($showDeadline):?>
<td id='deadlineTd'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->bug->deadline?></span>
<span><?php echo html::input('deadline', $deadline, "class='form-control form-date'");?></span>
<div class='table-col'>
<div class='input-group' id='deadlineBox'>
<span class='input-group-addon fix-border'><?php echo $lang->bug->deadline;?></span>
<?php echo html::input('deadline', $deadline, "class='form-control form-date'");?>
</div>
</div>
<?php endif;?>
</div>
</td>
<td>
<div class='input-group' id='feedback'>
<span class="input-group-addon"><?php echo $lang->bug->feedbackBy?></span>
<?php echo html::input('feedbackBy', '', "class='form-control'");?>
<span class="input-group-addon"><?php echo $lang->bug->notifyEmail?></span>
<?php echo html::input('notifyEmail', '', "class='form-control'");?>
</div>
</td>
</tr>
<?php endif;?>
<?php if($showExecution):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>

View File

@@ -148,6 +148,14 @@ js::set('confirmUnlinkBuild' , sprintf($lang->bug->confirmUnlinkBuild, zget(
<th><?php echo $lang->bug->deadline;?></th>
<td><?php echo html::input('deadline', $bug->deadline, "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->feedbackBy;?></th>
<td><?php echo html::input('feedbackBy', $bug->feedbackBy, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->notifyEmail;?></th>
<td><?php echo html::input('notifyEmail', $bug->notifyEmail, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->os;?></th>
<td><?php echo html::select('os', $lang->bug->osList, $bug->os, "class='form-control chosen'");?></td>

View File

@@ -224,8 +224,12 @@
</td>
</tr>
<tr>
<th><?php echo $lang->bug->os;?></th>
<td><?php echo $lang->bug->osList[$bug->os];?></td>
<th><?php echo $lang->bug->feedbackBy;?></th>
<td><?php echo $bug->feedbackBy;?></td>
</tr>
<tr>
<th><?php echo $lang->bug->notifyEmail;?></th>
<td><?php echo $bug->notifyEmail;?></td>
</tr>
<tr>
<th><?php echo $lang->bug->browser;?></th>