From e4b03d7ff3248ac2bfc839e446e4cd9ee89e13f8 Mon Sep 17 00:00:00 2001 From: "shiyangyangwork@yahoo.cn" Date: Mon, 10 Oct 2011 08:13:07 +0000 Subject: [PATCH] * finish the task #542 --- db/update2.2.sql | 2 ++ module/bug/config.php | 6 +++--- module/bug/lang/en.php | 9 +++++---- module/bug/lang/zh-cn.php | 9 +++++---- module/bug/model.php | 3 ++- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/db/update2.2.sql b/db/update2.2.sql index c8ca08178f..08676c9475 100644 --- a/db/update2.2.sql +++ b/db/update2.2.sql @@ -1 +1,3 @@ ALTER TABLE `zt_story` ADD `source` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `plan` ; +ALTER TABLE `zt_bug` ADD `activatedCount` SMALLINT( 6 ) NOT NULL AFTER `status` ; +ALTER TABLE `zt_bug` CHANGE `status` `status` ENUM( 'active', 'reactivated', 'resolved', 'closed' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'active' ; diff --git a/module/bug/config.php b/module/bug/config.php index 242b2a5bcc..37d55b4212 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -62,7 +62,7 @@ $config->bug->resolve->requiredFields = 'resolution'; $config->bug->list->allFields = 'id, module, project, story, task, title, keywords, severity, pri, type, os, browser, hardware, - found, steps, status, mailto, + found, steps, status, activatedCount, mailto, openedBy, openedDate, openedBuild, assignedTo, assignedDate, resolvedBy, resolution, resolvedBuild, resolvedDate, @@ -71,11 +71,11 @@ $config->bug->list->allFields = 'id, module, project, story, task, case, lastEditedBy, lastEditedDate'; -$config->bug->list->defaultFields = 'id,severity,pri,title,openedBy,assignedTo,resolvedBy,resolution'; +$config->bug->list->defaultFields = 'id,severity,pri,title, activatedCount,openedBy,assignedTo,resolvedBy,resolution'; $config->bug->list->exportFields = 'id, product, module, project, story, task, title, keywords, severity, pri, type, os, browser, - steps, status, mailto, + steps, status, activatedCount, mailto, openedBy, openedDate, openedBuild, assignedTo, assignedDate, resolvedBy, resolution, resolvedBuild, resolvedDate, diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index c02a6598a7..80c6a548ea 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -203,10 +203,11 @@ $lang->bug->typeList['automation'] = 'Automation'; $lang->bug->typeList['trackthings'] = 'Tracking'; $lang->bug->typeList['others'] = 'Others'; -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = 'Active'; -$lang->bug->statusList['resolved'] = 'Resolved'; -$lang->bug->statusList['closed'] = 'Closed'; +$lang->bug->statusList[''] = ''; +$lang->bug->statusList['active'] = 'Active'; +$lang->bug->statusList['resolved'] = 'Resolved'; +$lang->bug->statusList['closed'] = 'Closed'; +$lang->bug->statusList['reactivated'] = 'Reactivated'; $lang->bug->resolutionList[''] = ''; $lang->bug->resolutionList['bydesign'] = 'By design'; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index fd13fefddf..ad9dd68890 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -203,10 +203,11 @@ $lang->bug->typeList['automation'] = '测试脚本'; $lang->bug->typeList['trackthings'] = '事务跟踪'; $lang->bug->typeList['others'] = '其他'; -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = '激活'; -$lang->bug->statusList['resolved'] = '已解决'; -$lang->bug->statusList['closed'] = '已关闭'; +$lang->bug->statusList[''] = ''; +$lang->bug->statusList['active'] = '激活'; +$lang->bug->statusList['resolved'] = '已解决'; +$lang->bug->statusList['closed'] = '已关闭'; +$lang->bug->statusList['reactivated'] = '重新激活'; $lang->bug->resolutionList[''] = ''; $lang->bug->resolutionList['bydesign'] = '设计如此'; diff --git a/module/bug/model.php b/module/bug/model.php index 77ed5a26f9..9c9e714b29 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -208,7 +208,7 @@ class bugModel extends model ->setDefault('assignedTo', $oldBug->resolvedBy) ->add('assignedDate', $now) ->add('resolution', '') - ->add('status', 'active') + ->add('status', 'reactivated') ->add('resolvedDate', '0000-00-00') ->add('resolvedBy', '') ->add('resolvedBuild', '') @@ -222,6 +222,7 @@ class bugModel extends model ->get(); $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); + $this->dao->update(TABLE_BUG)->set('activatedCount = activatedCount + 1')->where('id')->eq((int)$bugID)->exec(); } /**