Merge branch '20.x' of https://github.com/easysoft/zentaopms into 20.x
This commit is contained in:
@@ -197,6 +197,7 @@ if(!defined('TABLE_LANG')) define('TABLE_LANG', '`' . $config->db-
|
||||
if(!defined('TABLE_STAGE')) define('TABLE_STAGE', '`' . $config->db->prefix . 'stage`');
|
||||
if(!defined('TABLE_DESIGN')) define('TABLE_DESIGN', '`' . $config->db->prefix . 'design`');
|
||||
if(!defined('TABLE_DESIGNSPEC')) define('TABLE_DESIGNSPEC', '`' . $config->db->prefix . 'designspec`');
|
||||
if(!defined('TABLE_ISSUE')) define('TABLE_ISSUE', '`' . $config->db->prefix . 'issue`');
|
||||
if(!defined('TABLE_RISK')) define('TABLE_RISK', '`' . $config->db->prefix . 'risk`');
|
||||
if(!defined('TABLE_PROJECTSPEC')) define('TABLE_PROJECTSPEC', '`' . $config->db->prefix . 'projectspec`');
|
||||
if(!defined('TABLE_WORKESTIMATION')) define('TABLE_WORKESTIMATION', '`' . $config->db->prefix . 'workestimation`');
|
||||
|
||||
+78
-6
@@ -95,6 +95,78 @@ CREATE TABLE `zt_designspec` (
|
||||
UNIQUE KEY `design` (`design`,`version`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
<<<<<<< HEAD
|
||||
-- DROP TABLE IF EXISTS `zt_issue`;
|
||||
CREATE TABLE `zt_issue` (
|
||||
`id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`program` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`commit` varchar(30) NOT NULL,
|
||||
`project` mediumint(9) NOT NULL DEFAULT '0',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`parent` mediumint(8) unsigned NOT NULL,
|
||||
`status` varchar(30) NOT NULL,
|
||||
`subStatus` varchar(30) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`commitBy` varchar(30) NOT NULL,
|
||||
`commitDate` datetime NOT NULL,
|
||||
`assignedTo` varchar(30) NOT NULL,
|
||||
`assignedBy` varchar(30) NOT NULL,
|
||||
`assignedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`story` char(30) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`version` smallint(6) NOT NULL,
|
||||
`type` char(30) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `zt_designspec` (
|
||||
`design` mediumint(8) NOT NULL,
|
||||
`version` smallint(6) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`files` varchar(255) NOT NULL,
|
||||
UNIQUE KEY `design` (`design`,`version`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_issue`;
|
||||
CREATE TABLE `zt_issue` (
|
||||
`id` mediumint(8) UNSIGNED NOT NULL,
|
||||
`resolvedBy` varchar(30) NOT NULL,
|
||||
`program` varchar(255) NOT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`pri` char(30) NOT NULL,
|
||||
`severity` char(30) NOT NULL,
|
||||
`type` char(30) NOT NULL,
|
||||
`activity` varchar(255) NOT NULL,
|
||||
`effectedArea` varchar(255) NOT NULL,
|
||||
`deadline` date NOT NULL,
|
||||
`resolution` char(30) NOT NULL,
|
||||
`resolutionComment` text NOT NULL,
|
||||
`objectID` varchar(255) NOT NULL,
|
||||
`resolvedDate` date NOT NULL,
|
||||
`status` varchar(30) NOT NULL,
|
||||
`owner` varchar(255) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`activateBy` varchar(30) NOT NULL,
|
||||
`activateDate` date NOT NULL,
|
||||
`closeBy` varchar(30) NOT NULL,
|
||||
`closedDate` date NOT NULL,
|
||||
`assignedTo` varchar(30) NOT NULL,
|
||||
`assignedBy` varchar(30) NOT NULL,
|
||||
`assignedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `zt_risk` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`program` varchar(255) NOT NULL,
|
||||
@@ -115,15 +187,15 @@ CREATE TABLE `zt_risk` (
|
||||
`addedDate` date NOT NULL,
|
||||
`resolution` text NOT NULL,
|
||||
`resolvedBy` varchar(30) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`cancelReason` char(30) NOT NULL,
|
||||
`activateBy` varchar(30) NOT NULL,
|
||||
`activateDate` date NOT NULL,
|
||||
`closeBy` varchar(30) NOT NULL,
|
||||
`closedDate` date NOT NULL,
|
||||
`assignedTo` varchar(30) NOT NULL,
|
||||
`assignedBy` varchar(30) NOT NULL,
|
||||
`assignedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_projectspec`;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$config->issue->create = new stdclass();
|
||||
$config->issue->create->requiredFields = 'title,type,severity';
|
||||
|
||||
$config->issue->editor = new stdclass();
|
||||
$config->issue->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of issue module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package issue
|
||||
* @version $Id: control.php 5145 2013-07-15 06:47:26Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class issue extends control
|
||||
{
|
||||
/**
|
||||
* Get issue list data.
|
||||
*
|
||||
* @param string $browseType
|
||||
* @param string orderBy
|
||||
* @param int recTotal
|
||||
* @param int recPerPage
|
||||
* @param int pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($browseType = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->view->title = $this->lang->issue->common . $this->lang->colon . $this->lang->issue->browse;
|
||||
$this->view->position[] = $this->lang->issue->browse;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a issue.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$result = $this->issue->create();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('browse', 'browseType=all')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->issue->common . $this->lang->colon . $this->lang->issue->create;
|
||||
$this->view->position[] = $this->lang->issue->common;
|
||||
$this->view->position[] = $this->lang->issue->create;
|
||||
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
$lang->issue->common = '项目问题';
|
||||
$lang->issue->browse = '问题列表';
|
||||
$lang->issue->resolvedBy = '解决者';
|
||||
$lang->issue->program = '所属项目';
|
||||
$lang->issue->title = '标题';
|
||||
$lang->issue->desc = '描述';
|
||||
$lang->issue->pri = '优先级';
|
||||
$lang->issue->severity = '严重程度';
|
||||
$lang->issue->type = '类别';
|
||||
$lang->issue->effectedArea = '受影响的活动';
|
||||
$lang->issue->activity = '活动列表';
|
||||
$lang->issue->deadline = '计划解决日期';
|
||||
$lang->issue->resolution = '解决方式';
|
||||
$lang->issue->resolutionComment = '解决方案';
|
||||
$lang->issue->resolvedDate = '实际解决日期';
|
||||
$lang->issue->status = '结果';
|
||||
$lang->issue->createdBy = '由谁创建';
|
||||
$lang->issue->createdDate = '创建日期';
|
||||
$lang->issue->owner = '提出人';
|
||||
$lang->issue->editedBy = '由谁编辑';
|
||||
$lang->issue->editedDate = '编辑日期';
|
||||
$lang->issue->activateBy = '由谁激活';
|
||||
$lang->issue->activateDate = '激活日期';
|
||||
$lang->issue->closeBy = '由谁关闭';
|
||||
$lang->issue->closedDate = '关闭日期';
|
||||
$lang->issue->assignedTo = '指派给';
|
||||
$lang->issue->assignedBy = '由谁指派';
|
||||
$lang->issue->assignedDate = '指派时间';
|
||||
$lang->issue->resolved = '解决';
|
||||
|
||||
$lang->issue->create = '新建';
|
||||
$lang->issue->batchCreate = '批量新建';
|
||||
|
||||
$lang->issue->labelList['open'] = '开放';
|
||||
$lang->issue->labelList['assignTo'] = '指派给我';
|
||||
$lang->issue->labelList['closed'] = '已关闭';
|
||||
$lang->issue->labelList['suspended'] = '已挂起';
|
||||
$lang->issue->labelList['cancelled'] = '已取消';
|
||||
|
||||
$lang->issue->priList[''] = '';
|
||||
$lang->issue->priList['1'] = 1;
|
||||
$lang->issue->priList['2'] = 2;
|
||||
$lang->issue->priList['3'] = 3;
|
||||
$lang->issue->priList['4'] = 4;
|
||||
|
||||
$lang->issue->serverityList[''] = '';
|
||||
$lang->issue->serverityList['1'] = '严重';
|
||||
$lang->issue->serverityList['2'] = '较严重';
|
||||
$lang->issue->serverityList['3'] = '较小';
|
||||
$lang->issue->serverityList['4'] = '建议';
|
||||
|
||||
$lang->issue->typeList[''] = '';
|
||||
$lang->issue->typeList['design'] = '设计问题';
|
||||
$lang->issue->typeList['code'] = '程序缺陷';
|
||||
$lang->issue->typeList['performance'] = '性能问题';
|
||||
$lang->issue->typeList['version'] = '版本控制';
|
||||
$lang->issue->typeList['storyadd'] = '需求新增';
|
||||
$lang->issue->typeList['storychanged'] = '需求修改';
|
||||
$lang->issue->typeList['storyremoved'] = '需求删除';
|
||||
$lang->issue->typeList['data'] = '数据问题';
|
||||
|
||||
$lang->issue->resolutionList['resolved'] = '已解决';
|
||||
$lang->issue->resolutionList['tostory'] = '转需求';
|
||||
$lang->issue->resolutionList['tobug'] = '转BUG';
|
||||
$lang->issue->resolutionList['torisk'] = '转风险';
|
||||
$lang->issue->resolutionList['totask'] = '转任务';
|
||||
|
||||
$lang->issue->statusList['unconfirmed'] = '待确认';
|
||||
$lang->issue->statusList['confirmed'] = '已确认';
|
||||
$lang->issue->statusList['unresolved'] = '正解决';
|
||||
$lang->issue->statusList['resolved'] = '已解决';
|
||||
$lang->issue->statusList['canceled'] = '取消';
|
||||
$lang->issue->statusList['closed'] = '已关闭';
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of issue module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package issue
|
||||
* @version $Id: model.php 5145 2013-07-15 06:47:26Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class issueModel extends model
|
||||
{
|
||||
public function create()
|
||||
{
|
||||
$now = helper::now();
|
||||
$data = fixer::input('post')
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->add('createdDate', $now)
|
||||
->addIF($this->post->assignedTo, 'assignedBy', $this->app->user->account)
|
||||
->addIF($this->post->assignedTo, 'assignedDate', $now)
|
||||
->stripTags($this->config->issue->editor->create['id'], $this->config->allowedTags)
|
||||
->get();
|
||||
|
||||
if(strpos($this->config->issue->create->requiredFields, 'type') !== false and !$this->post->type)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->type);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(strpos($this->config->issue->create->requiredFields, 'title') !== false and !$this->post->title)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->title);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(strpos($this->config->issue->create->requiredFields, 'severity') !== false and !$this->post->severity)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->severity);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->dao->insert(TABLE_ISSUE)->data($data)->exec();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* The batch close view of story module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Congzhi Chen <congzhi@cnezsoft.com>
|
||||
* @package story
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php echo html::a($this->createLink('issue', 'browse', 'browseType=all'), '<span class="text">' . $lang->issue->browse . '</span>', '', 'class="btn btn-link btn-active-text"');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('issue', 'create', '', "<i class='icon icon-plus'></i>" . $lang->issue->create, '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('issue', 'batchCreate', '', "<i class='icon icon-plus'></i>" . $lang->issue->batchCreate, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* The batch close view of story module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Congzhi Chen <congzhi@cnezsoft.com>
|
||||
* @package story
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div class="main-content" id="mainCentent">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->issue->create;?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" class="main-form form-ajax" enctype="multipart/form-data" id="issueForm">
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->type;?></th>
|
||||
<td class="required"><?php echo html::select('type', $lang->issue->typeList, '', 'class="form-control chosen"');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->title;?></th>
|
||||
<td class="required"><?php echo html::input('title', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->severity;?></th>
|
||||
<td class="required"><?php echo html::select('severity', $lang->issue->serverityList, '', 'class="form-control chosen"');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->pri;?></th>
|
||||
<td><?php echo html::select('pri', $lang->issue->priList, '', 'class="form-control chosen"');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->deadline;?></th>
|
||||
<td><?php echo html::input('deadline', '', 'class="form-control form-date"');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->assignedTo;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, '', 'class="form-control chosen"');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->desc;?></th>
|
||||
<td colspan="3"><?php echo html::textarea('desc', '', 'row="6"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user