diff --git a/db/update20.0.sql b/db/update20.0.sql index 73f2e83257..aa979ca17e 100644 --- a/db/update20.0.sql +++ b/db/update20.0.sql @@ -10,7 +10,11 @@ ADD `lifetime` char(30) NOT NULL AFTER `product`, ADD `budget` varchar(30) NOT NULL DEFAULT '0' AFTER `lifetime`, ADD `budgetUnit` char(30) NOT NULL DEFAULT 'yuan' AFTER `budget`, ADD `percent` float unsigned NOT NULL DEFAULT '0' AFTER `budgetUnit`, -ADD `auth` char(30) NOT NULL AFTER `percent`, ADD `milestone` enum('0','1') NOT NULL default '0' AFTER `percent`, ADD `attribute` varchar(30) NOT NULL DEFAULT '' AFTER `budgetUnit`, ADD `realBegan` date NOT NULL AFTER `end`, ADD `realEnd` date NOT NULL AFTER `realStarted`, +ADD `auth` char(30) NOT NULL AFTER `percent`, +ADD `milestone` enum('0','1') NOT NULL default '0' AFTER `percent`, +ADD `attribute` varchar(30) NOT NULL DEFAULT '' AFTER `budgetUnit`, +ADD `realBegan` date NOT NULL AFTER `end`, +ADD `realEnd` date NOT NULL AFTER `realBegan`, ADD `version` smallint(6) NOT NULL AFTER `desc`, ADD `parentVersion` smallint(6) NOT NULL AFTER `version`, ADD `planDuration` int(11) NOT NULL AFTER `parentVersion`, @@ -319,7 +323,7 @@ CREATE TABLE `zt_weeklyreport`( ALTER TABLE `zt_project` ADD `path` varchar(255) NOT NULL AFTER `parent`; ALTER TABLE `zt_project` ADD `grade` tinyint unsigned NOT NULL AFTER `path`; -INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES +REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system','custom','','hourPoint','1'), ('system','custom','','URAndSR','1'), ('system','custom','waterfall','URSRName','{\"URCommon\":{\"zh-cn\":\"\\u7528\\u6237\\u9700\\u6c42\"},\"SRCommon\":{\"zh-cn\":\"\\u8f6f\\u4ef6\\u9700\\u6c42\"}}'), diff --git a/module/upgrade/css/mergeprogram.css b/module/upgrade/css/mergeprogram.css index b410548550..a49f56cfd9 100644 --- a/module/upgrade/css/mergeprogram.css +++ b/module/upgrade/css/mergeprogram.css @@ -6,3 +6,16 @@ #budget {border-right:0px;} .divider{background:#f1f1f1 !important; width:20px !important; padding:1px !important;} .gray{background:#f1f1f1 !important} + +.main-row{margin-top: 20px; padding: 20px; background: #f1f1f1} +.main-row .side-col .nav li.active a{background: #006af1;color: #fff; border-radius: 4px} + +#source .lineBox{margin-top: 30px} +#source .lineGroup-title .item{float: left;} +#source .lineGroup-title .item:first-child{width: 40%} +#source .lineGroup-title .item:last-child{width: 60%} +#source .lineGroup>div{display: table-cell} +#source .lineGroup{background: #f1f1f1; margin-top:20px; border-radius: 4px; padding:5px;} +#source .lineGroup+.lineGroup{margin-top:10px;} +#source .lineGroup .productList{vertical-align: middle; width: 170px;} +#source .lineGroup .projectList .scroll-handle{max-height: 200px; overflow-y: scroll;} diff --git a/module/upgrade/js/mergeprogram.js b/module/upgrade/js/mergeprogram.js index 97f77ba5e5..4c1c07d269 100644 --- a/module/upgrade/js/mergeprogram.js +++ b/module/upgrade/js/mergeprogram.js @@ -1,5 +1,9 @@ $(function() { + $('.side-col .cell').height($('.side-col').height() - 20); + $('#source .cell').height($('#source').height() - 20); + $('#programBox .cell').height($('#programBox').height() - 20); + pgmBegin = $('.pgmParams #begin').val(); setPgmBegin(pgmBegin); @@ -17,6 +21,25 @@ $(function() setPgmBegin(pgmBegin); }) + $('#lineList li a').click(function() + { + /* Active current li and remove active before li. */ + $(this).closest('ul').find('li').removeClass('active'); + $(this).closest('li').addClass('active'); + + /* Show current data and hide before data. */ + var target = $(this).attr('data-target'); + $('.lineBox').addClass('hidden'); + $(target).removeClass('hidden'); + $(target).closest('tbody').find(':checkbox').prop('checked', false); + $(target).find(":checkbox").prop('checked', true); + + /* Replace program name. */ + $('#name').val($(this).text()); + + setPgmBegin(pgmBegin); + }) + $('[name^=products]').change(function() { value = $(this).val(); diff --git a/module/upgrade/lang/zh-cn.php b/module/upgrade/lang/zh-cn.php index 6e2fbfc65c..98565c2b47 100644 --- a/module/upgrade/lang/zh-cn.php +++ b/module/upgrade/lang/zh-cn.php @@ -36,40 +36,29 @@ $lang->upgrade->setStatusFile = '

升级之前请先完成下面的操
  • 或者删掉"%s" 这个文件 ,重新创建一个ok.txt文件,不需要内容。
  • 我已经仔细阅读上面提示且完成上述工作,继续更新

    '; -$lang->upgrade->selectVersion = '选择版本'; -$lang->upgrade->continue = '继续'; -$lang->upgrade->noteVersion = "务必选择正确的版本,否则会造成数据丢失。"; -$lang->upgrade->fromVersion = '原来的版本'; -$lang->upgrade->toVersion = '升级到'; -$lang->upgrade->confirm = '确认要执行的SQL语句'; -$lang->upgrade->sureExecute = '确认执行'; -$lang->upgrade->forbiddenExt = '以下插件与新版本不兼容,已经自动禁用:'; -$lang->upgrade->updateFile = '需要更新附件信息。'; -$lang->upgrade->noticeSQL = '检查到你的数据库跟标准不一致,尝试修复失败。请执行以下SQL语句,再刷新页面检查。'; -$lang->upgrade->afterDeleted = '以上文件未能删除, 删除后刷新!'; -$lang->upgrade->mergeProgram = '数据归并'; -$lang->upgrade->to20Tips = '禅道20版本升级提示'; -$lang->upgrade->to20Button = '我已经做好备份,开始升级吧!'; -$lang->upgrade->to20Desc = <<尊敬的用户,感谢对禅道的支持。自20版本开始,禅道全面升级成为通用的项目管理平台。和之前的版本相比,20版本的禅道增加了大项目和管理模型的概念。接下来我们将通过向导的方式来帮助您完成此次升级。此次升级共分为两部分:项目数据归并和权限重新设置。

    -
    -

    一、项目数据归并

    -

    我们会将之前的产品和项目的数据归并到大项目概念下,并根据你选择管理模型的不同,调整概念为如下:

    - -
    -

    二、权限重新设置

    -

    禅道自20版本开始权限以大项目为一个基础单位来进行授权,授权的机制为:

    -

    管理员授权给项目管理员 > 项目管理员授权给项目成员

    -
    +$lang->upgrade->selectVersion = '选择版本'; +$lang->upgrade->continue = '继续'; +$lang->upgrade->noteVersion = "务必选择正确的版本,否则会造成数据丢失。"; +$lang->upgrade->fromVersion = '原来的版本'; +$lang->upgrade->toVersion = '升级到'; +$lang->upgrade->confirm = '确认要执行的SQL语句'; +$lang->upgrade->sureExecute = '确认执行'; +$lang->upgrade->forbiddenExt = '以下插件与新版本不兼容,已经自动禁用:'; +$lang->upgrade->updateFile = '需要更新附件信息。'; +$lang->upgrade->noticeSQL = '检查到你的数据库跟标准不一致,尝试修复失败。请执行以下SQL语句,再刷新页面检查。'; +$lang->upgrade->afterDeleted = '以上文件未能删除, 删除后刷新!'; +$lang->upgrade->mergeProgram = '数据归并'; +$lang->upgrade->to20Tips = '禅道20版本升级提示'; +$lang->upgrade->to20Button = '我已经做好备份,开始升级吧!'; +$lang->upgrade->to20TipsHeader = "

    尊敬的用户,感谢对禅道的支持。自20版本开始,禅道全面升级成为通用的项目管理平台。相关介绍请看如下视频:


    "; +$lang->upgrade->to20Desc = <<

    友情提示:

      -
    1. 可以先安装一个20版本的禅道,体验一下里边的概念和流程。
    2. +
    3. 您可以先安装一个20版本的禅道,体验一下里边的概念和流程。
    4. 20版本禅道改动比较大,升级之前请做好备份。
    5. +
    6. 请放心升级,即使第一次升级不到位,后续还可以再调整,不会影响系统数据。
    7. +
    8. 点击查看20.0版系统demo。
    EOD; @@ -79,7 +68,7 @@ $lang->upgrade->program = '归并项目'; $lang->upgrade->existPGM = '已有项目'; $lang->upgrade->PRJAdmin = '项目管理员'; $lang->upgrade->product = $lang->productCommon; -$lang->upgrade->project = $lang->projectCommon; +$lang->upgrade->project = '迭代'; $lang->upgrade->newProgram = '新建'; $lang->upgrade->mergeSummary = "尊敬的用户,您的系统中共有%s个产品,%s个迭代等待迁移。经系统计算,我们推荐您的迁移方案如下,您也可以根据自己的情况进行调整:"; diff --git a/module/upgrade/view/createprogram.html.php b/module/upgrade/view/createprogram.html.php index 992312e4f7..f0e037b065 100644 --- a/module/upgrade/view/createprogram.html.php +++ b/module/upgrade/view/createprogram.html.php @@ -17,31 +17,21 @@ - program->name;?> + program->PGMName;?> - program->code;?> + program->PRJName;?> + + + + program->PRJCode;?> - upgrade->PRJAdmin;?> - - - - program->PM;?> + program->PRJPM;?> '') + $users, '', "class='form-control chosen'");?> - - program->budget;?> - -
    - - - program->unitList, 'yuan', "class='form-control'");?> -
    - - program->dateRange;?> @@ -52,18 +42,9 @@ - - project->days;?> - -
    - - project->day;?> -
    - - project->acl;?> - program->aclList, 'open', "onclick='setWhite(this.value);'", 'block'));?> + program->PGMPRJAclList, 'open', "onclick='setWhite(this.value);'", 'block'));?> project->whitelist;?> diff --git a/module/upgrade/view/mergebyline.html.php b/module/upgrade/view/mergebyline.html.php index 4fa203991a..ded81b075a 100644 --- a/module/upgrade/view/mergebyline.html.php +++ b/module/upgrade/view/mergebyline.html.php @@ -1,59 +1,75 @@ -
    -
    -
    - upgrade->mergeSummary, $noMergedProductCount, $noMergedProjectCount); - echo '
    ' . $lang->upgrade->mergeByProductLine; - ?> + +
    + upgrade->mergeSummary, $noMergedProductCount, $noMergedProjectCount); + echo '
    ' . $lang->upgrade->mergeByProductLine; + ?> +
    +
    +
    +
    +
    +
    upgrade->line;?>
    +
    + +
    +
    - - - - - - - - - - - - id])) - { - unset($productlines[$line->id]); - continue; - } - ?> - - - - - - + + + - -
    upgrade->line;?>upgrade->product;?>upgrade->project;?>
    - id => "{$line->name}"), $i == 0 ? $line->id : 0, "data-lineid='{$line->id}'");?> - - - id] as $productID => $product):?> - id]", array($productID => "{$lang->productCommon} #{$product->id} {$product->name}"), $i == 0 ? $product->id : 0, "data-productid='{$product->id}' data-line='{$line->id}' data-begin='{$product->createdDate}'");?> - id][$productID]", $productID);?> + +
    +
    +
    +
    upgrade->product;?>
    +
    upgrade->project;?>
    +
    + + + id])) + { + unset($productlines[$line->id]); + continue; + } + ?> +
    lineBox'> + + id] as $productID => $product):?> +
    +
    + id]", array($productID => "{$lang->productCommon} #{$product->id} {$product->name}"), $i == 0 ? $product->id : 0, "data-productid='{$product->id}' data-line='{$line->id}' data-begin='{$product->createdDate}'");?> + id][$productID]", $productID);?> +
    +
    +
    - id][$productID]", array($project->id => "{$lang->projectCommon} #{$project->id} {$project->name}"), $i == 0 ? $project->id : 0, "data-product='{$product->id}' data-line='{$line->id}' data-begin='{$project->begin}'");?> - id][$productID][$project->id]", $project->id);?> + id][$productID]", array($project->id => "{$lang->upgrade->project} #{$project->id} {$project->name}"), $i == 0 ? $project->id : 0, "data-product='{$product->id}' data-line='{$line->id}' data-begin='{$project->begin}'");?> + id][$productID][$project->id]", $project->id);?> - -
    +
    + + +
    +
    name; include "./createprogram.html.php"; ?> +
    diff --git a/module/upgrade/view/to20.html.php b/module/upgrade/view/to20.html.php index 739d2cff30..fc2a44c34d 100644 --- a/module/upgrade/view/to20.html.php +++ b/module/upgrade/view/to20.html.php @@ -14,7 +14,10 @@
    upgrade->to20Tips;?>
    -
    upgrade->to20Desc;?>
    +
    + upgrade->to20TipsHeader;?> + upgrade->to20Desc;?> +
    diff --git a/www/upgrade.php.tmp b/www/upgrade.php.tmp deleted file mode 100644 index 2856517a7e..0000000000 --- a/www/upgrade.php.tmp +++ /dev/null @@ -1,64 +0,0 @@ - - * @package ZenTaoPMS - * @version $Id: upgrade.php 4677 2013-04-26 06:23:58Z chencongzhi520@gmail.com $ - * @link http://www.zentao.net - */ -/* Judge my.php exists or not. */ -define('IN_UPGRADE', true); -$dbConfig = dirname(dirname(__FILE__)) . '/config/db.php'; -$myConfig = dirname(dirname(__FILE__)) . '/config/my.php'; -if(file_exists($dbConfig)) -{ - if(file_exists($myConfig)) - { - $myContent = trim(file_get_contents($myConfig)); - $myContent = str_replace('"; - echo "Please execute the command 'chmod 777 $configDir' to modify the permissions to ensure that the ZenTao has operating file permissions in this directory"; - exit; - } - - if(!empty($myContent)) - { - $myContent = file_get_contents($myConfig) . "\n" . $myContent; - file_put_contents($myConfig, $myContent); - } -} -if(!file_exists($myConfig)) die(header('location: install.php')); - -error_reporting(0); - -/* Load the framework. */ -include '../framework/router.class.php'; -include '../framework/control.class.php'; -include '../framework/model.class.php'; -include '../framework/helper.class.php'; - -/* Instance the app. */ -$app = router::createApp('pms', dirname(dirname(__FILE__)), 'router'); -$common = $app->loadCommon(); - -/* Reset the config params to make sure the install program will be lauched. */ -$config->set('requestType', 'GET'); -$config->set('default.module', 'upgrade'); -$app->setDebug(); - -/* Check the installed version is the latest or not. */ -$config->installedVersion = $common->loadModel('setting')->getVersion(); -if(($config->version[0] == $config->installedVersion[0] or (is_numeric($config->version[0]) and is_numeric($config->installedVersion[0]))) and version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php')); - -/* Run it. */ -$app->parseRequest(); -$common->checkUpgradeStatus(); -$app->loadModule();