Merge branch 'sprint/172_liyuchun_44367' into sprint/168

This commit is contained in:
王怡栋
2021-11-17 14:41:44 +08:00
18 changed files with 145 additions and 24 deletions
+8
View File
@@ -95,4 +95,12 @@ INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VA
('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`;
ALTER TABLE `zt_story`
ADD `feedbackBy` varchar(100) NOT NULL AFTER `version`,
ADD `notifyEmail` varchar(100) NOT NULL AFTER `feedbackBy`;
ALTER TABLE `zt_product` ADD `reviewer` varchar(255) NOT NULL AFTER `whitelist`;
+4
View File
@@ -177,6 +177,8 @@ CREATE TABLE IF NOT EXISTS `zt_bug` (
`confirmed` tinyint(1) NOT NULL default '0',
`activatedCount` smallint(6) NOT NULL,
`activatedDate` datetime NOT NULL,
`feedbackBy` varchar(100) NOT NULL,
`notifyEmail` varchar(100) NOT NULL,
`mailto` text,
`openedBy` varchar(30) NOT NULL default '',
`openedDate` datetime NOT NULL,
@@ -1125,6 +1127,8 @@ CREATE TABLE IF NOT EXISTS `zt_story` (
`linkStories` varchar(255) NOT NULL,
`duplicateStory` mediumint(8) unsigned NOT NULL,
`version` smallint(6) NOT NULL default '1',
`feedbackBy` varchar(100) NOT NULL,
`notifyEmail` varchar(100) NOT NULL,
`URChanged` enum('0','1') NOT NULL DEFAULT '0',
`deleted` enum('0','1') NOT NULL default '0',
PRIMARY KEY (`id`),
+3
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;}
+2
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';
+2
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 = '创建者';
+7 -1
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)
+20 -10
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'>
<?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>
<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 load-all-user'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
</div>
<?php $showDeadline = strpos(",$showFields,", ',deadline,') !== false;?>
<?php if($showDeadline):?>
<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>
<?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>
<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;?>
+8
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>
+8
View File
@@ -223,6 +223,14 @@
?>
</td>
</tr>
<tr>
<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->os;?></th>
<td><?php echo $lang->bug->osList[$bug->os];?></td>
+1
View File
@@ -5,6 +5,7 @@ $config->story->batchCreate = 10;
$config->story->affectedFixedNum = 7;
$config->story->needReview = 1;
$config->story->removeFields = 'objectTypeList,productList,executionList,execution';
$config->story->feedbackSource = array('customer', 'user', 'market', 'service', 'operation', 'support', 'forum');
$config->story->batchClose = new stdclass();
$config->story->batchClose->columns = 10;
+13
View File
@@ -24,6 +24,19 @@ $(function()
var value = $select.val();
$selector.find('.pri-text').html('<span class="label-pri label-pri-' + value + '" title="' + value + '">' + value + '</span>');
});
$('#source').on('change', function()
{
var source = $(this).val();
if($.inArray(source, feedbackSource) != -1)
{
$('#feedbackBox').removeClass('hidden');
}
else
{
$('#feedbackBox').addClass('hidden');
}
});
});
function refreshPlan()
+13
View File
@@ -19,4 +19,17 @@ $(function()
reviewers = $('#reviewer').val();
}
})
$('#source').on('change', function()
{
var source = $(this).val();
if($.inArray(source, feedbackSource) != -1)
{
$('.feedbackBox').removeClass('hidden');
}
else
{
$('.feedbackBox').addClass('hidden');
}
});
})
+2
View File
@@ -129,6 +129,8 @@ $lang->story->reviewedBy = 'ReviewedBy';
$lang->story->reviewers = 'Reviewers';
$lang->story->reviewedDate = 'ReviewedDate';
$lang->story->version = 'Version';
$lang->story->feedbackBy = 'Feedback By';
$lang->story->notifyEmail = 'Notify Email';
$lang->story->plan = 'Linked Plan';
$lang->story->planAB = 'Plan';
$lang->story->comment = 'Comment';
+2
View File
@@ -129,6 +129,8 @@ $lang->story->reviewedBy = '由谁评审';
$lang->story->reviewers = '评审人员';
$lang->story->reviewedDate = '评审时间';
$lang->story->version = '版本号';
$lang->story->feedbackBy = '反馈者';
$lang->story->notifyEmail = '通知邮箱';
$lang->story->plan = "所属计划";
$lang->story->planAB = '计划';
$lang->story->comment = '备注';
+10 -1
View File
@@ -207,6 +207,8 @@ class storyModel extends model
->setIF($this->post->needNotReview, 'status', 'active')
->setIF($this->post->plan > 0, 'stage', 'planned')
->setIF($this->post->estimate, 'estimate', (float)$this->post->estimate)
->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'feedbackBy', '')
->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'notifyEmail', '')
->setIF($executionID > 0, 'stage', 'projected')
->setIF($bugID > 0, 'fromBug', $bugID)
->join('mailto', ',')
@@ -233,7 +235,11 @@ class storyModel extends model
$requiredFields = trim($requiredFields, ',');
$this->dao->insert(TABLE_STORY)->data($story, 'spec,verify')->autoCheck()->batchCheck($requiredFields, 'notempty')->exec();
$this->dao->insert(TABLE_STORY)->data($story, 'spec,verify')
->autoCheck()
->checkIF($story->notifyEmail, 'notifyEmail', 'email')
->batchCheck($requiredFields, 'notempty')
->exec();
if(!dao::isError())
{
$storyID = $this->dao->lastInsertID();
@@ -744,6 +750,8 @@ class storyModel extends model
->setIF($this->post->closedReason != false and $oldStory->closedDate == '', 'closedDate', $now)
->setIF($this->post->closedBy != false or $this->post->closedReason != false, 'status', 'closed')
->setIF($this->post->closedReason != false and $this->post->closedBy == false, 'closedBy', $this->app->user->account)
->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'feedbackBy', '')
->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'notifyEmail', '')
->setIF(!empty($_POST['plan'][0]) and $oldStory->stage == 'wait', 'stage', 'planned')
->stripTags($this->config->story->editor->edit['id'], $this->config->allowedTags)
->join('reviewedBy', ',')
@@ -820,6 +828,7 @@ class storyModel extends model
->checkIF(isset($story->closedBy), 'closedReason', 'notempty')
->checkIF(isset($story->closedReason) and $story->closedReason == 'done', 'stage', 'notempty')
->checkIF(isset($story->closedReason) and $story->closedReason == 'duplicate', 'duplicateStory', 'notempty')
->checkIF($story->notifyEmail, 'notifyEmail', 'email')
->where('id')->eq((int)$storyID)->exec();
if(!dao::isError())
+23 -12
View File
@@ -17,6 +17,7 @@
</style>
<?php js::set('holders', $lang->story->placeholder); ?>
<?php js::set('blockID', $blockID); ?>
<?php js::set('feedbackSource', $config->story->feedbackSource); ?>
<?php if(common::checkNotCN()):?>
<style> .sourceTd > .input-group > .input-group > .input-group-addon:first-child{padding: 5px 18px} </style>
<?php endif;?>
@@ -100,8 +101,7 @@
<?php endif;?>
<tr>
<th><?php echo $lang->story->reviewedBy;?></th>
<?php $colspan = $type == 'story' ? "colspan='4'" : "colspan='2'";?>
<td <?php echo $colspan;?> id='reviewerBox'>
<td colspan='2' id='reviewerBox'>
<div class="table-row">
<div class="table-col">
<?php echo html::select('reviewer[]', $reviewers, empty($needReview) ? $product->PO : '', "class='form-control chosen' multiple");?>
@@ -119,18 +119,29 @@
</div>
</td>
<?php if($type == 'requirement'):?>
<?php if(strpos(",$showFields,", ',source,') !== false):?>
<td colspan="2" class='sourceTd'>
<?php if(strpos(",$showFields,", ',source,') !== false):?>
<td colspan="2" class='sourceTd'>
<div class="input-group">
<div class="input-group">
<div class="input-group">
<div class="input-group-addon" style="min-width: 77px;"><?php echo $lang->story->source;?></div>
<?php echo html::select('source', $lang->story->sourceList, $source, "class='form-control chosen'");?>
<span class='input-group-addon' id="sourceNoteBox"><?php echo $lang->story->sourceNote;?></span>
<?php echo html::input('sourceNote', $sourceNote, "class='form-control' style='width:140px;'");?>
</div>
<div class="input-group-addon" style="min-width: 77px;"><?php echo $lang->story->source;?></div>
<?php echo html::select('source', $lang->story->sourceList, $source, "class='form-control chosen'");?>
<span class='input-group-addon' id="sourceNoteBox"><?php echo $lang->story->sourceNote;?></span>
<?php echo html::input('sourceNote', $sourceNote, "class='form-control' style='width:140px;'");?>
</div>
</td>
<?php endif;?>
</div>
</td>
<?php endif;?>
<?php else:?>
<td colspan="2" id='feedbackBox' class='hidden'>
<div class="input-group">
<div class="input-group">
<div class="input-group-addon" style="min-width: 77px;"><?php echo $lang->story->feedbackBy;?></div>
<?php echo html::input('feedbackBy', '', "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->story->notifyEmail;?></span>
<?php echo html::input('notifyEmail', '', "class='form-control'");?>
</div>
</div>
</td>
<?php endif;?>
</tr>
<?php if($type == 'story' and $this->config->URAndSR):?>
+9
View File
@@ -19,6 +19,7 @@
<?php js::set('storyModule', $lang->story->module);?>
<?php js::set('reviewers', explode(',', $reviewers));?>
<?php js::set('reviewerNotEmpty', $lang->story->notice->reviewerNotEmpty);?>
<?php js::set('feedbackSource', $config->story->feedbackSource); ?>
<div class='main-content' id='mainContent'>
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
<div class='main-header'>
@@ -182,6 +183,14 @@
<th><?php echo $lang->story->estimate;?></th>
<td><?php echo $story->parent >= 0 ? html::input('estimate', $story->estimate, "class='form-control'") : $story->estimate;?></td>
</tr>
<tr class='feedbackBox <?php echo strpos(',customre,support,', $story->source) !== false ? '' : 'hidden';?>'>
<th><?php echo $lang->story->feedbackBy;?></th>
<td><?php echo html::input('feedbackBy', $story->feedbackBy, "class='form-control'");?></td>
</tr>
<tr class='feedbackBox <?php echo strpos(',customre,support,', $story->source) !== false ? '' : 'hidden';?>'>
<th><?php echo $lang->story->notifyEmail;?></th>
<td><?php echo html::input('notifyEmail', $story->notifyEmail, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->story->keywords;?></th>
<td><?php echo html::input('keywords', $story->keywords, "class='form-control'");?></td>
+10
View File
@@ -348,6 +348,16 @@
<th><?php echo $lang->story->estimate;?></th>
<td title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
</tr>
<?php if(in_array($story->source, $config->story->feedbackSource)):?>
<tr>
<th><?php echo $lang->story->feedbackBy;?></th>
<td><?php echo $story->feedbackBy;?></td>
</tr>
<tr>
<th><?php echo $lang->story->notifyEmail;?></th>
<td><?php echo $story->notifyEmail;?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->story->keywords;?></th>
<td><?php echo $story->keywords;?></td>