diff --git a/db/update15.9.sql b/db/update15.9.sql
index b7c6396a34..c2e2acd946 100644
--- a/db/update15.9.sql
+++ b/db/update15.9.sql
@@ -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`;
diff --git a/db/zentao.sql b/db/zentao.sql
index c6f1f109a8..8eb979c646 100644
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -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`),
diff --git a/module/bug/css/create.css b/module/bug/css/create.css
index 433e87435a..1009ffdf84 100644
--- a/module/bug/css/create.css
+++ b/module/bug/css/create.css
@@ -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;}
diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php
index 4df3eeb931..1d6b45945f 100644
--- a/module/bug/lang/en.php
+++ b/module/bug/lang/en.php
@@ -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';
diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php
index 8c11dead7d..96ff6bd192 100644
--- a/module/bug/lang/zh-cn.php
+++ b/module/bug/lang/zh-cn.php
@@ -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 = '创建者';
diff --git a/module/bug/model.php b/module/bug/model.php
index 8cfa5e97a6..c1e4d7d4ff 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -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)
diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php
index 7af9d2793b..39b62fae8f 100644
--- a/module/bug/view/create.html.php
+++ b/module/bug/view/create.html.php
@@ -129,21 +129,31 @@ js::set('moduleID', $moduleID);
| bug->lblAssignedTo;?> |
- |
-
-
-
- |
-
diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php
index 437efffd65..b9d6b442b7 100644
--- a/module/bug/view/edit.html.php
+++ b/module/bug/view/edit.html.php
@@ -148,6 +148,14 @@ js::set('confirmUnlinkBuild' , sprintf($lang->bug->confirmUnlinkBuild, zget(
bug->deadline;?> |
deadline, "class='form-control form-date'");?> |
+
+ | bug->feedbackBy;?> |
+ feedbackBy, "class='form-control'");?> |
+
+
+ | bug->notifyEmail;?> |
+ notifyEmail, "class='form-control'");?> |
+
| bug->os;?> |
bug->osList, $bug->os, "class='form-control chosen'");?> |
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php
index b6d6c8bdbd..09d7ef5fb1 100644
--- a/module/bug/view/view.html.php
+++ b/module/bug/view/view.html.php
@@ -223,6 +223,14 @@
?>
+
+ | bug->feedbackBy;?> |
+ feedbackBy;?> |
+
+
+ | bug->notifyEmail;?> |
+ notifyEmail;?> |
+
| bug->os;?> |
bug->osList[$bug->os];?> |
diff --git a/module/story/config.php b/module/story/config.php
index 71fd167136..537d48e7a2 100644
--- a/module/story/config.php
+++ b/module/story/config.php
@@ -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;
diff --git a/module/story/js/create.js b/module/story/js/create.js
index 473c38bd5f..70d8d69f15 100644
--- a/module/story/js/create.js
+++ b/module/story/js/create.js
@@ -24,6 +24,19 @@ $(function()
var value = $select.val();
$selector.find('.pri-text').html('' + value + '');
});
+
+ $('#source').on('change', function()
+ {
+ var source = $(this).val();
+ if($.inArray(source, feedbackSource) != -1)
+ {
+ $('#feedbackBox').removeClass('hidden');
+ }
+ else
+ {
+ $('#feedbackBox').addClass('hidden');
+ }
+ });
});
function refreshPlan()
diff --git a/module/story/js/edit.js b/module/story/js/edit.js
index f124856088..f234363a3e 100644
--- a/module/story/js/edit.js
+++ b/module/story/js/edit.js
@@ -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');
+ }
+ });
})
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index d59c74c0bb..f9f860a5bd 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -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';
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index 30e658b15b..8d5e25e265 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -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 = '备注';
diff --git a/module/story/model.php b/module/story/model.php
index cf4ec4c765..601880b177 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -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())
diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php
index ca50a74931..4d6a98547b 100644
--- a/module/story/view/create.html.php
+++ b/module/story/view/create.html.php
@@ -17,6 +17,7 @@
story->placeholder); ?>
+story->feedbackSource); ?>
@@ -100,8 +101,7 @@
| story->reviewedBy;?> |
-
- id='reviewerBox'>
+ |
PO : '', "class='form-control chosen' multiple");?>
@@ -119,18 +119,29 @@
|
-
-
+
+ |
+ |
-
+
+
+
+
+
+
+ |
config->URAndSR):?>
diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php
index cc28420747..9b7db5c487 100644
--- a/module/story/view/edit.html.php
+++ b/module/story/view/edit.html.php
@@ -19,6 +19,7 @@
story->module);?>
story->notice->reviewerNotEmpty);?>
+story->feedbackSource); ?>