Merge branch 'sprint/zentaobiz12_ticket' into 'master'

ticket

See merge request easycorp/zentaopms!5772
This commit is contained in:
王怡栋
2022-10-18 01:48:02 +00:00
32 changed files with 600 additions and 20 deletions
+2 -1
View File
@@ -216,6 +216,7 @@ $config->openMethods[] = 'kanban.importplan';
$config->openMethods[] = 'kanban.importrelease';
$config->openMethods[] = 'kanban.importexecution';
$config->openMethods[] = 'kanban.importbuild';
$config->openMethods[] = 'kanban.importticket';
$config->openMethods[] = 'kanban.activatecard';
$config->openMethods[] = 'kanban.finishcard';
$config->openMethods[] = 'kanban.deleteobjectcard';
@@ -402,4 +403,4 @@ $config->waterfallModules = array('workestimation', 'durationestimation', 'budge
$config->showMainMenu = true;
$config->maxPriValue = '256';
$config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback');
$config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback', 'ticket');
+65 -1
View File
@@ -1,6 +1,70 @@
CREATE TABLE IF NOT EXISTS `zt_ticket` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`module` mediumint(8) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`type` varchar(30) NOT NULL,
`desc` text NOT NULL,
`openedBuild` varchar(255) NOT NULL,
`feedback` mediumint(8) NOT NULL,
`assignedTo` varchar(255) NOT NULL,
`assignedDate` datetime NOT NULL,
`realStarted` datetime NOT NULL,
`startedBy` varchar(255) NOT NULL,
`startedDate` datetime NOT NULL,
`deadline` date NOT NULL,
`pri` tinyint unsigned NOT NULL DEFAULT '0',
`estimate` float unsigned NOT NULL,
`consumed` float unsigned NOT NULL,
`left` float unsigned NOT NULL,
`status` varchar(30) NOT NULL,
`openedBy` varchar(30) NOT NULL,
`openedDate` datetime NOT NULL,
`activatedCount` int(10) NOT NULL,
`activatedBy` varchar(30) NOT NULL,
`activatedDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL,
`closedDate` datetime NOT NULL,
`closedReason` varchar(30) NOT NULL,
`finishedBy` varchar(30) NOT NULL,
`finishedDate` datetime NOT NULL,
`resolvedBy` varchar(30) NOT NULL,
`resolvedDate` datetime NOT NULL,
`resolution` varchar(1000) NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`keywords` varchar(255) NOT NULL,
`repeatTicket` mediumint(8) NOT NULL DEFAULT '0',
`mailto` varchar(255) NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
key `product` (`product`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_ticketsource` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`ticketId` mediumint(8) unsigned NOT NULL,
`customer` varchar(100) NOT NULL,
`contact` varchar(100) NOT NULL,
`notifyEmail` varchar(100) NOT NULL,
`createdDate` datetime NOT NULL,
PRIMARY KEY (`id`),
key `ticketId` (`ticketId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `zt_ticketrelation` (
`id` mediumint unsigned NOT NULL AUTO_INCREMENT,
`ticketId` mediumint unsigned NOT NULL,
`objectId` mediumint NOT NULL,
`objectType` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
KEY `ticketId` (`ticketId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `zt_product` ADD `ticket` varchar(30) NOT NULL AFTER `feedback`;
ALTER TABLE `zt_kanban` ADD `colWidth` smallint(4) NOT NULL DEFAULT '264' AFTER `fluidBoard`;
ALTER TABLE `zt_kanban` ADD `minColWidth` smallint(4) NOT NULL DEFAULT '180' AFTER `colWidth`;
ALTER TABLE `zt_kanban` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`;
ALTER TABLE `zt_project` ADD `colWidth` smallint(4) NOT NULL DEFAULT '264' AFTER `fluidBoard`;
ALTER TABLE `zt_project` ADD `minColWidth` smallint(4) NOT NULL DEFAULT '180' AFTER `colWidth`;
ALTER TABLE `zt_project` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`;
ALTER TABLE `zt_project` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`;
+65
View File
@@ -7120,6 +7120,70 @@ CREATE TABLE IF NOT EXISTS `zt_feedback` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_ticket`;
CREATE TABLE IF NOT EXISTS `zt_ticket` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`module` mediumint(8) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`type` varchar(30) NOT NULL,
`desc` text NOT NULL,
`openedBuild` varchar(255) NOT NULL,
`feedback` mediumint(8) NOT NULL,
`assignedTo` varchar(255) NOT NULL,
`assignedDate` datetime NOT NULL,
`realStarted` datetime NOT NULL,
`startedBy` varchar(255) NOT NULL,
`startedDate` datetime NOT NULL,
`deadline` date NOT NULL,
`pri` tinyint unsigned NOT NULL DEFAULT '0',
`estimate` float unsigned NOT NULL,
`consumed` float unsigned NOT NULL,
`left` float unsigned NOT NULL,
`status` varchar(30) NOT NULL,
`openedBy` varchar(30) NOT NULL,
`openedDate` datetime NOT NULL,
`activatedCount` int(10) NOT NULL,
`activatedBy` varchar(30) NOT NULL,
`activatedDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL,
`closedDate` datetime NOT NULL,
`closedReason` varchar(30) NOT NULL,
`finishedBy` varchar(30) NOT NULL,
`finishedDate` datetime NOT NULL,
`resolvedBy` varchar(30) NOT NULL,
`resolvedDate` datetime NOT NULL,
`resolution` varchar(1000) NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`keywords` varchar(255) NOT NULL,
`repeatTicket` mediumint(8) NOT NULL DEFAULT '0',
`mailto` varchar(255) NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
key `product` (`product`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_ticketsource` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`ticketId` mediumint(8) unsigned NOT NULL,
`customer` varchar(100) NOT NULL,
`contact` varchar(100) NOT NULL,
`notifyEmail` varchar(100) NOT NULL,
`createdDate` datetime NOT NULL,
PRIMARY KEY (`id`),
key `ticketId` (`ticketId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `zt_ticketrelation` (
`id` mediumint unsigned NOT NULL AUTO_INCREMENT,
`ticketId` mediumint unsigned NOT NULL,
`objectId` mediumint NOT NULL,
`objectType` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
KEY `ticketId` (`ticketId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `zt_bug` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `caseVersion`;
ALTER TABLE `zt_story` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `fromBug`;
ALTER TABLE `zt_user` ADD `feedback` enum('0', '1') NOT NULL DEFAULT '0' AFTER `locked`;
@@ -7625,6 +7689,7 @@ ADD `grade` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `path`,
ADD `order` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `grade`;
ALTER TABLE `zt_product` ADD `feedback` varchar(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `RD`;
ALTER TABLE `zt_product` ADD `ticket` varchar(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `feedback`;
ALTER TABLE `zt_leave` ADD `level` tinyint(3) NOT NULL;
ALTER TABLE `zt_leave` ADD `assignedTo` varchar(30) NOT NULL;
+1
View File
@@ -215,6 +215,7 @@ $lang->action->desc->importedproductplan = '$date, imported to <strong>$extra</
$lang->action->desc->importedrelease = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedexecution = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedbuild = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedticket = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->fromsonarqube = '$date, created by <strong>$actor</strong> from <strong>SonarQube Issue</strong>.' . "\n";
$lang->action->desc->tolib = '$date, imported by <strong>$actor</strong> .' . "\n";
$lang->action->desc->updatetolib = '$date, updated to ' . $lang->testcase->common . ' by <strong>$actor</strong>.' . "\n";
+1
View File
@@ -215,6 +215,7 @@ $lang->action->desc->importedproductplan = '$date, imported to <strong>$extra</
$lang->action->desc->importedrelease = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedexecution = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedbuild = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedticket = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->fromsonarqube = '$date, created by <strong>$actor</strong> from <strong>SonarQube Issue</strong>.' . "\n";
$lang->action->desc->tolib = '$date, imported by <strong>$actor</strong> .' . "\n";
$lang->action->desc->updatetolib = '$date, updated to ' . $lang->testcase->common . ' by <strong>$actor</strong>.' . "\n";
+1
View File
@@ -215,6 +215,7 @@ $lang->action->desc->importedproductplan = '$date, imported to <strong>$extra</
$lang->action->desc->importedrelease = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedexecution = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedbuild = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->importedticket = '$date, imported to <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
$lang->action->desc->fromsonarqube = '$date, created by <strong>$actor</strong> from <strong>SonarQube Issue</strong>.' . "\n";
$lang->action->desc->tolib = '$date, Importé par <strong>$actor</strong> .' . "\n";
$lang->action->desc->updatetolib = '$date, MàJ de ' . $lang->testcase->common . ' par <strong>$actor</strong>.' . "\n";
+2
View File
@@ -215,6 +215,7 @@ $lang->action->desc->importedproductplan = '$date, 由 <strong>$actor</strong>
$lang->action->desc->importedrelease = '$date, 由 <strong>$actor</strong> 从产品发布 <strong>$extra</strong> 导入。' . "\n";
$lang->action->desc->importedexecution = '$date, 由 <strong>$actor</strong> 从项目执行 <strong>$extra</strong> 导入。' . "\n";
$lang->action->desc->importedbuild = '$date, 由 <strong>$actor</strong> 从项目版本 <strong>$extra</strong> 导入。' . "\n";
$lang->action->desc->importedticket = '$date, 由 <strong>$actor</strong> 从反馈工单 <strong>$extra</strong> 导入。' . "\n";
$lang->action->desc->fromsonarqube = '$date, 由 <strong>$actor</strong> 从<strong>SonarQube问题</strong>转化而来。' . "\n";
$lang->action->desc->tolib = '$date, 由 <strong>$actor</strong> 导入。' . "\n";
$lang->action->desc->updatetolib = '$date, 由 <strong>$actor</strong> 从' . $lang->testcase->common . '更新。' . "\n";
@@ -717,6 +718,7 @@ $lang->action->label->mr = '合并请求|mr|view|id=%s';
$lang->action->label->gitlab = 'GitLab服务器|gitlab|view|id=%s';
$lang->action->label->stage = '瀑布模型的阶段|stage|browse|';
$lang->action->label->module = '模块|tree|browse|productid=%s&type=story&currentModuleID=0&branch=all';
$lang->action->label->ticket = '工单|ticket|view|id=%s';
/* Object type. */
$lang->action->search = new stdclass();
+12 -8
View File
@@ -1735,10 +1735,11 @@ class block extends control
if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true;
if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true;
if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true;
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['risk'] = true;
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['issue'] = true;
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['meeting'] = true;
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['risk'] = true;
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['issue'] = true;
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['meeting'] = true;
if(common::hasPriv('feedback', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['feedback'] = true;
if(common::hasPriv('ticket', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['ticket'] = true;
$params = $this->get->param;
$params = json_decode(base64_decode($params));
@@ -1747,14 +1748,14 @@ class block extends control
$objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount', 'requirement' => 'requirementCount');
if($this->config->edition == 'max')
{
$objectList += array('risk' => 'risks', 'issue' => 'issues', 'feedback' => 'feedbacks');
$objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount', 'feedback' => 'feedbackCount');
$objectList += array('risk' => 'risks', 'issue' => 'issues', 'feedback' => 'feedbacks', 'ticket' => 'tickets');
$objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount', 'feedback' => 'feedbackCount', 'ticket' => 'ticketCount');
}
if($this->config->edition == 'biz')
{
$objectList += array('feedback' => 'feedbacks');
$objectCountList += array('feedback' => 'feedbackCount');
$objectList += array('feedback' => 'feedbacks', 'ticket' => 'tickets');
$objectCountList += array('feedback' => 'feedbackCount', 'ticket' => 'ticketCount');
}
$tasks = $this->loadModel('task')->getUserSuspendedTasks($this->app->user->account);
@@ -1770,6 +1771,7 @@ class block extends control
->beginIF($objectType == 'bug')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')->fi()
->beginIF($objectType == 'task')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution=t2.id')->fi()
->beginIF($objectType == 'issue' or $objectType == 'risk')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')->fi()
->beginIF($objectType == 'ticket')->leftJoin(TABLE_USER)->alias('t2')->on('t1.openedBy = t2.account')->fi()
->where('t1.deleted')->eq(0)
->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
->beginIF($objectType == 'story')->andWhere('t1.type')->eq('story')->andWhere('t2.deleted')->eq('0')->fi()
@@ -1780,6 +1782,7 @@ class block extends control
->beginIF($objectType != 'todo')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($objectType == 'feedback')->andWhere('t1.status')->in('wait, noreview')->fi()
->beginIF($objectType == 'issue' or $objectType == 'risk')->andWhere('t2.deleted')->eq(0)->fi()
->beginIF($objectType == 'ticket')->andWhere('t1.status')->in('wait,doing,done')->fi()
->orderBy($orderBy)
->beginIF($limitCount)->limit($limitCount)->fi()
->fetchAll();
@@ -1824,9 +1827,10 @@ class block extends control
if($objectType == 'risk') $this->app->loadLang('risk');
if($objectType == 'issue') $this->app->loadLang('issue');
if($objectType == 'feedback')
if($objectType == 'feedback' or $objectType == 'ticket')
{
$this->app->loadLang('feedback');
$this->app->loadLang('ticket');
$this->view->users = $this->loadModel('user')->getPairs('all,noletter');
$this->view->products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->fetchPairs('id', 'name');
}
+1
View File
@@ -358,6 +358,7 @@ $lang->block->availableBlocks->risk = 'My Risks';
$lang->block->availableBlocks->issue = 'My Issues';
$lang->block->availableBlocks->meeting = 'My Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
$lang->block->availableBlocks->ticket = 'Ticket';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project';
$lang->block->moduleList['product'] = $lang->productCommon;
+1
View File
@@ -358,6 +358,7 @@ $lang->block->availableBlocks->risk = 'Risks';
$lang->block->availableBlocks->issue = 'Issues';
$lang->block->availableBlocks->meeting = 'Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
$lang->block->availableBlocks->ticket = 'Ticket';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project';
$lang->block->moduleList['product'] = $lang->productCommon;
+1
View File
@@ -358,6 +358,7 @@ $lang->block->availableBlocks->risk = 'My Risks';
$lang->block->availableBlocks->issue = 'My Issues';
$lang->block->availableBlocks->meeting = 'My Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
$lang->block->availableBlocks->ticket = 'Ticket';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project';
$lang->block->moduleList['product'] = $lang->productCommon;
+2
View File
@@ -358,6 +358,7 @@ $lang->block->availableBlocks->risk = '风险';
$lang->block->availableBlocks->issue = '问题';
$lang->block->availableBlocks->meeting = '会议';
$lang->block->availableBlocks->feedback = '反馈';
$lang->block->availableBlocks->ticket = '工单';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = '项目';
$lang->block->moduleList['product'] = $lang->productCommon;
@@ -478,6 +479,7 @@ $lang->block->issueCount = '问题数';
$lang->block->storyCount = '需求数';
$lang->block->meetingCount = '会议数';
$lang->block->feedbackCount = '反馈数';
$lang->block->ticketCount = '工单数';
$lang->block->typeList = new stdclass();
+36
View File
@@ -0,0 +1,36 @@
<?php if(empty($tickets)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.block-tickets .c-id {width: 50px;}
</style>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-fixed table-fixed-head table-hover tablesorter block-tickets <?php if(!$longBlock) echo 'block-sm'?>'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB?></th>
<th class='c-product'><?php echo $lang->ticket->product;?></th>
<th class='c-title'><?php echo $lang->ticket->title?></th>
<th class='c-type'><?php echo $lang->ticket->type;?></th>
<th class='c-openedBy'><?php echo $lang->ticket->createdBy;?></th>
<th class='c-openedDate'><?php echo $lang->ticket->createdDate;?></th>
</tr>
</thead>
<tbody>
<?php foreach($tickets as $ticket):?>
<?php
$appid = isset($_GET['entry']) ? "class='app-btn' data-id='{$this->get->entry}'" : '';
?>
<tr>
<td><?php echo sprintf('%03d', $ticket->id);?></td>
<td><?php echo zget($products, $ticket->product);?></td>
<td class='c-title' title='<?php echo $ticket->title?>'><?php echo html::a($this->createLink('ticket', 'view', "ticketID=$ticket->id"), $ticket->title, '', "data-app='my'")?></td>
<td><?php echo zget($lang->ticket->typeList, $ticket->type)?></td>
<td><?php echo zget($users, $ticket->openedBy)?></td>
<td><?php echo $ticket->openedDate;?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php endif;?>
+1 -1
View File
@@ -78,7 +78,7 @@ class bugModel extends model
->join('mailto', ',')
->join('os', ',')
->join('browser', ',')
->remove('files,labels,uid,oldTaskID,contactListMenu,region,lane')
->remove('files,labels,uid,oldTaskID,contactListMenu,region,lane,ticket')
->get();
if($bug->execution != 0) $bug->project = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($bug->execution)->fetch('project');
+2 -2
View File
@@ -160,11 +160,11 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
<?php if($showNoticefeedbackBy):?>
<tr>
<th><nobr><?php echo $lang->bug->feedbackBy;?></nobr></th>
<td><?php echo html::input('feedbackBy', $feedbackBy, "class='form-control'");?></td>
<td><?php echo html::input('feedbackBy', isset($feedbackBy) ? $feedbackBy : '', "class='form-control'");?></td>
<td id='notifyEmailTd'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->bug->notifyEmail?></span>
<span><?php echo html::input('notifyEmail', $notifyEmail, "class='form-control'");?></span>
<span><?php echo html::input('notifyEmail', isset($notifyEmail) ? $notifyEmail : '', "class='form-control'");?></span>
</div>
</td>
</tr>
+49
View File
@@ -1372,6 +1372,55 @@ class kanban extends control
$this->display();
}
/**
* Import ticket.
*
* @param int $kanbanID
* @param int $regionID
* @param int $groupID
* @param int $columnID
* @param int $selectedProductID
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function importTicket($kanbanID = 0, $regionID = 0, $groupID = 0, $columnID = 0, $selectedProductID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if($_POST)
{
$importedIDList = $this->kanban->importObject($kanbanID, $regionID, $groupID, $columnID, 'ticket');
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
foreach($importedIDList as $cardID => $ticketID)
{
$this->loadModel('action')->create('kanbancard', $cardID, 'importedTicket', '', $ticketID);
}
return print(js::locate($this->createLink('kanban', 'view', "kanbanID=$kanbanID"), 'parent.parent'));
}
$this->loadModel('product');
$this->loadModel('ticket');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$this->view->products = array($this->lang->kanban->allProducts) + $this->product->getPairs();
$this->view->selectedProductID = $selectedProductID;
$this->view->lanePairs = $this->kanban->getLanePairsByGroup($groupID);
$this->view->tickets2Imported = $this->ticket->getTicketByProduct($selectedProductID, '', 'id_desc', $pager);
$this->view->pager = $pager;
$this->view->kanbanID = $kanbanID;
$this->view->regionID = $regionID;
$this->view->groupID = $groupID;
$this->view->columnID = $columnID;
$this->display();
}
/**
* Set a card's color.
*
+88 -1
View File
@@ -343,6 +343,10 @@ function renderKanbanItem(item, $item)
{
renderProductplanItem(item, $item);
}
else if(item.fromType == 'ticket')
{
renderTicketItem(item, $item);
}
else
{
if(!$title.length)
@@ -746,6 +750,88 @@ function renderBuildItem(item, $item)
}
}
/**
* Render execution item.
*
* @param object item
* @param object $item
* @access public
* @return void
*/
function renderTicketItem(item, $item)
{
/* Output header information. */
var privs = item.actions;
if(privs.includes('sortCard')) $item.parent().addClass('sort');
var $header = $item.children('.header');
if(!$header.length) $header = $(
[
'<div class="header">',
'</div>'
].join('')).appendTo($item);
var $titleBox = $header.children('.ticketTitle');
if(!$titleBox.length) $titleBox = $(
[
'<div class="ticketTitle">',
'</div>'
].join('')).appendTo($header);
/* Print ticket name. */
var $title = $titleBox.children('.title');
var name = item.title ? item.title : item.name;
if(!$title.length)
{
var icon = 'file-text';
if(privs.includes('viewTicket') && item.deleted == '0') $title = $('<a class="title"><i class="icon icon-' + icon + '"></i>' + name + '</a>').appendTo($titleBox).attr('href', createLink('ticket', 'view', 'ticketID=' + item.fromID));
if(!privs.includes('viewTicket') || item.deleted == '1') $title = $('<div class="title"><i class="icon icon-' + icon + '"></i>' + name + '</div>').appendTo($titleBox);
}
$title.attr('title', name);
$item.data('card', item);
var $info = $item.children('.info');
if(!$info.length) $info = $(
[
'<div class="info">',
'</div>'
].join('')).appendTo($item);
var $statusBox = $info.children('.execStatus');
if(!$statusBox.length)
{
if(item.deleted == '0')
{
$statusBox = $('<span class="execStatus label label-' + item.objectStatus + '">' + ticketLang.statusList[item.objectStatus] + '</span>').appendTo($info);
}
else
{
$statusBox = $('<span class="execStatus label label-deleted">' + ticketLang.deleted + '</span>').appendTo($info);
}
}
/* Display deadline of execution. */
if(item.deadline != '0000-00-00')
{
var $date = $info.children('.date');
var deadline = $.zui.createDate(item.deadline);
var today = new Date();
var labelType = deadline.toLocaleDateString() == today.toLocaleDateString() ? 'danger' : 'wait';
if(!$date.length) $date = $('<span class="date label label-' + labelType + '"></span>').appendTo($info);
$date.text($.zui.formatDate(deadline, 'MM-dd') + ' ' + kanbancardLang.deadlineAB).attr('title', $.zui.formatDate(deadline, 'yyyy-MM-dd') + ' ' + kanbancardLang.deadlineAB).show();
}
/* Display avatars of ticket assignedTo. */
var $user = $info.children('.user');
var user = [item.assignedTo];
if(users[item.assignedTo])
{
if(!$user.length) $user = $('<div class="user"></div>').appendTo($info);
$user.html(renderUsersAvatar(user, item.id)).attr('title', users[item.assignedTo]);
}
}
/**
* Show error message
* @param {string|object} message Message
@@ -1505,7 +1591,8 @@ $(function()
var importReleaseLink = kanban.object.indexOf('releases') != -1 ? "<li><a class='iframe' data-toggle='modal'' href='" + createLink('kanban', 'importRelease', 'kanbanID=' + kanban.id + '&regionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID) + "'>" + kanbanLang.importRelease + '</a></li>' : '';
var importExecutionLink = kanban.object.indexOf('executions') != -1 ? "<li><a class='iframe' data-toggle='modal' href='" + createLink('kanban', 'importExecution', 'kanbanID=' + kanban.id + '&regionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID) + "'>" + kanbanLang.importExecution + '</a></li>' : '';
var importBuildLink = kanban.object.indexOf('builds') != -1 ? "<li><a class='iframe' data-toggle='modal' href='" + createLink('kanban', 'importBuild', 'kanbanID=' + kanban.id + '&regionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID) + "'>" + kanbanLang.importBuild + '</a></li>' : '';
var importSubmenu = '<ul class="dropdown-menu">' + importPlanLink + importReleaseLink + importExecutionLink + importBuildLink +'</ul>';
var importTicketLink = kanban.object.indexOf('tickets') != -1 ? "<li><a class='iframe' data-toggle='modal' href='" + createLink('kanban', 'importTicket', 'kanbanID=' + kanban.id + '&regionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID) + "'>" + kanbanLang.importTicket + '</a></li>' : '';
var importSubmenu = '<ul class="dropdown-menu">' + importPlanLink + importReleaseLink + importExecutionLink + importBuildLink + importTicketLink + '</ul>';
$('.import').parent().append(importSubmenu);
});
+2
View File
@@ -83,6 +83,7 @@ $lang->kanban->importPlan = 'Plan';
$lang->kanban->importRelease = 'Release';
$lang->kanban->importExecution = $lang->execution->common;
$lang->kanban->importBuild = 'Build';
$lang->kanban->importTicket = 'Ticket';
$lang->kanban->allKanban = 'All Kanban';
$lang->kanban->allProjects = 'All ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Projects');
$lang->kanban->allProducts = 'All Products';
@@ -236,6 +237,7 @@ $lang->kanban->importObjectList['plans'] = 'Product Plan';
$lang->kanban->importObjectList['releases'] = 'Release';
$lang->kanban->importObjectList['builds'] = 'Build';
$lang->kanban->importObjectList['executions'] = 'Execution';
if($this->config->edition != 'open') $lang->kanban->importObjectList['tickets'] = 'Ticket';
$lang->kanban->importObjectList['cards'] = 'Other Kanban Cards';
$lang->kanban->showWIPList[1] = 'Show';
+2
View File
@@ -83,6 +83,7 @@ $lang->kanban->importPlan = 'Plan';
$lang->kanban->importRelease = 'Release';
$lang->kanban->importExecution = $lang->execution->common;
$lang->kanban->importBuild = 'Build';
$lang->kanban->importTicket = 'Ticket';
$lang->kanban->allKanban = 'All Kanban';
$lang->kanban->allProjects = 'All ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Projects');
$lang->kanban->allProducts = 'All Products';
@@ -236,6 +237,7 @@ $lang->kanban->importObjectList['plans'] = 'Product Plan';
$lang->kanban->importObjectList['releases'] = 'Release';
$lang->kanban->importObjectList['builds'] = 'Build';
$lang->kanban->importObjectList['executions'] = 'Execution';
if($this->config->edition != 'open') $lang->kanban->importObjectList['tickets'] = 'Ticket';
$lang->kanban->importObjectList['cards'] = 'Other Kanban Cards';
$lang->kanban->showWIPList[1] = 'Show';
+2
View File
@@ -83,6 +83,7 @@ $lang->kanban->importPlan = 'Plan';
$lang->kanban->importRelease = 'Release';
$lang->kanban->importExecution = $lang->execution->common;
$lang->kanban->importBuild = 'Build';
$lang->kanban->importTicket = 'Ticket';
$lang->kanban->allKanban = 'All Kanban';
$lang->kanban->allProjects = 'All ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Projects');
$lang->kanban->allProducts = 'All Products';
@@ -236,6 +237,7 @@ $lang->kanban->importObjectList['plans'] = 'Product Plan';
$lang->kanban->importObjectList['releases'] = 'Release';
$lang->kanban->importObjectList['builds'] = 'Build';
$lang->kanban->importObjectList['executions'] = 'Execution';
if($this->config->edition != 'open') $lang->kanban->importObjectList['tickets'] = 'Ticket';
$lang->kanban->importObjectList['cards'] = 'Other Kanban Cards';
$lang->kanban->showWIPList[1] = 'Show';
+2
View File
@@ -83,6 +83,7 @@ $lang->kanban->importPlan = '计划';
$lang->kanban->importRelease = '发布';
$lang->kanban->importExecution = $lang->execution->common;
$lang->kanban->importBuild = '版本';
$lang->kanban->importTicket = '工单';
$lang->kanban->allKanban = '所有看板';
$lang->kanban->allProjects = '所有' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : '项目');
$lang->kanban->allProducts = '所有产品';
@@ -236,6 +237,7 @@ $lang->kanban->importObjectList['plans'] = '计划';
$lang->kanban->importObjectList['releases'] = '发布';
$lang->kanban->importObjectList['builds'] = '版本';
$lang->kanban->importObjectList['executions'] = $lang->execution->common;
if($this->config->edition != 'open') $lang->kanban->importObjectList['tickets'] = '工单';
$lang->kanban->importObjectList['cards'] = '其他看板卡片';
$lang->kanban->showWIPList[1] = '显示';
+2 -2
View File
@@ -1127,7 +1127,7 @@ class kanbanModel extends model
->andWhere('type')->eq('common')
->fetchAll();
$actions = array('editCard', 'archiveCard', 'deleteCard', 'moveCard', 'setCardColor', 'viewCard', 'sortCard', 'viewExecution', 'viewPlan', 'viewRelease', 'viewBuild');
$actions = array('editCard', 'archiveCard', 'deleteCard', 'moveCard', 'setCardColor', 'viewCard', 'sortCard', 'viewExecution', 'viewPlan', 'viewRelease', 'viewBuild', 'viewTicket');
$cardGroup = array();
foreach($cellList as $cell)
{
@@ -1146,7 +1146,7 @@ class kanbanModel extends model
$card->actions = array();
foreach($actions as $action)
{
if(in_array($action, array('viewExecution', 'viewPlan', 'viewRelease', 'viewBuild')))
if(in_array($action, array('viewExecution', 'viewPlan', 'viewRelease', 'viewBuild', 'viewTicket')))
{
if($card->fromType == 'execution')
{
+86
View File
@@ -0,0 +1,86 @@
<?php
/**
* The import release view of kanban module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Qiyu Xie<xieqiyu@cnezsoft.com>
* @package kanban
* @version $Id: importrelease.html.php 5090 2022-01-19 14:19:24Z xieqiyu@cnezsoft.com $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php js::set('kanbanID', $kanbanID);?>
<?php js::set('regionID', $regionID);?>
<?php js::set('groupID', $groupID);?>
<?php js::set('columnID', $columnID);?>
<?php js::set('methodName', $this->app->rawMethod);?>
<div id='mainContent' class='main-content importModal'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->kanban->importAB . $lang->kanban->importTicket;?></h2>
</div>
</div>
<div class='input-group space'>
<span class='input-group-addon'><?php echo $lang->kanban->selectedProduct;?></span>
<?php echo html::select('product', $products, $selectedProductID, "onchange='reloadObjectList(this.value)' class='form-control chosen' data-drop_direction='down'");?>
<span class='input-group-addon'><?php echo $lang->kanban->selectedLane;?></span>
<?php echo html::select('lane', $lanePairs, '', "onchange='setTargetLane(this.value)' class='form-control chosen' data-drop_direction='down'");?>
</div>
<?php if($tickets2Imported):?>
<form class='main-table' method='post' data-ride='table' target='hiddenwin' id='importTicketForm'>
<table class='table table-fixed' id='ticketList'>
<thead>
<tr>
<th class="c-id">
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php echo $lang->idAB;?>
</th>
<th class='c-name'><?php echo $lang->ticket->title;?></th>
<th class='c-pri'><?php echo $lang->ticket->priAB;?></th>
<th class='c-type'><?php echo $lang->ticket->type;?></th>
<th><?php echo $lang->ticket->createdDate;?></th>
<th class='c-name'><?php echo $lang->ticket->assignedTo;?></th>
</tr>
</thead>
<tbody>
<?php foreach($tickets2Imported as $ticket):?>
<tr>
<td class='c-id'>
<div class="checkbox-primary">
<input type='checkbox' name='tickets[]' value='<?php echo $ticket->id;?>'/>
<label></label>
</div>
<?php printf('%03d', $ticket->id);?>
</td>
<?php if(common::hasPriv('ticket', 'view')):?>
<td title='<?php echo $ticket->title;?>'>
<a href='javascript:void(0);' onclick="locateView('ticket', <?php echo $ticket->id;?>)"><?php echo $ticket->title;?></a>
</td>
<?php else:?>
<td title='<?php echo $ticket->title;?>'><?php echo $ticket->title;?></td>
<?php endif;?>
<td><span class='label-pri label-pri-<?php echo $ticket->pri;?>' title='<?php echo zget($this->lang->ticket->priList, $ticket->pri, $ticket->pri);?>'><?php echo zget($this->lang ->ticket->priList, $ticket->pri, $ticket->pri); ?></span></td>
<td title='<?php echo zget($this->lang->ticket->typeList, $ticket->type, $ticket->type);?>'><?php echo zget($this->lang->ticket->typeList, $ticket->type, $ticket->type);?></td>
<td title='<?php echo $ticket->openedDate;?>'><?php echo $ticket->openedDate;?></td>
<td title='<?php echo $ticket->assignedTo;?>'><?php echo $ticket->assignedTo;?></td>
</tr>
<?php endforeach;?>
<tr><?php echo html::hidden('targetLane', key($lanePairs));?></tr>
</tbody>
</table>
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar show-always"><?php echo html::submitButton($lang->kanban->importAB, '', 'btn btn-default');?></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php else:?>
<div class='table-empty-tip'><?php echo $lang->noData;?></div>
<?php endif;?>
</div>
<style>#product_chosen {width: 45% !important}</style>
<?php include '../../common/view/footer.lite.html.php';?>
+13 -1
View File
@@ -754,6 +754,10 @@ class mailModel extends model
{
$sendUsers = array($object->auditedBy, '');
}
elseif($objectType == 'ticket')
{
$sendUsers = $this->{$objectType}->getToAndCcList($object, $action);
}
else
{
$sendUsers = $this->{$objectType}->getToAndCcList($object);
@@ -785,7 +789,15 @@ class mailModel extends model
}
else
{
$this->send($toList, $subject, $mailContent, $ccList);
if($objectType == 'ticket')
{
$emails = $this->loadModel('ticket')->getContactEmails($objectID, $toList, $ccList, $action->action == 'closed');
$this->send($toList, $subject, $mailContent, $ccList, false, $emails);
}
else
{
$this->send($toList, $subject, $mailContent, $ccList);
}
}
if($this->isError()) error_log(join("\n", $this->getError()));
}
+49
View File
@@ -108,6 +108,7 @@ class my extends control
$this->loadModel('bug');
$this->loadModel('testcase');
$this->loadModel('testtask');
$this->loadModel('ticket');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -198,6 +199,9 @@ class my extends control
/* Get the number of meetings assigned to me. */
$meetings = $this->meeting->getListByUser('futureMeeting', 'id_desc', 0, $pager);
$meetingCount = $pager->recTotal;
$ticketList = $this->ticket->getList('assignedtome', 'id_desc', $pager);
$ticketCount = $pager->recTotal;
}
echo <<<EOF
@@ -223,6 +227,7 @@ if(isMax !== 0)
var reviewCount = $reviewCount;
var qaCount = $qaCount;
var meetingCount = $meetingCount;
var ticketCount = $ticketCount;
}
</script>
EOF;
@@ -1212,6 +1217,50 @@ EOF;
$this->display();
}
/**
* My ticket.
*
* @param string $browseType
* @param string $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function ticket($browseType = 'assignedtome', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->loadModel('ticket');
$queryID = $browseType == 'bysearch' ? (int)$param : 0;
$this->session->set('ticketList', $this->app->getURI(true), 'feedback');
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
if($browseType != 'bysearch')
{
$tickets = $this->ticket->getList($browseType, $orderBy, $pager);
}
else
{
$tickets = $this->ticket->getBySearch($queryID, $orderBy, $pager);
}
$actionURL = $this->createLink('my', 'work', "mode=ticket&type=bysearch&param=myQueryID&orderBy={$orderBy}&recTotal={$recTotal}&recPerPage={$recPerPage}&pageID={$pageID}");
$this->my->buildTicketSearchForm($queryID, $actionURL);
$this->view->title = $this->lang->ticket->browse;
$this->view->products = $this->loadModel('feedback')->getGrantProducts();
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted|noletter');
$this->view->tickets = $tickets;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->browseType = $browseType;
$this->display();
}
/**
* My team.
*
+5
View File
@@ -0,0 +1,5 @@
.c-pri {width: 75px;}
.c-openedDate {width: 210px;}
.c-assignedTo {width: 100px;}
.no-wrap{text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}
+1
View File
@@ -21,6 +21,7 @@ $(function()
$("#subNavbar li[data-id='audit'] a").append('<span class="label label-light label-badge">' + reviewCount + '</span>');
$("#subNavbar li[data-id='nc'] a").append('<span class="label label-light label-badge">' + qaCount + '</span>');
$("#subNavbar li[data-id='myMeeting'] a").append('<span class="label label-light label-badge">' + meetingCount + '</span>');
$("#subNavbar li[data-id='ticket'] a").append('<span class="label label-light label-badge">' + ticketCount + '</span>');
}
}
}
+25
View File
@@ -906,6 +906,31 @@ class myModel extends model
$this->loadModel('search')->setSearchParams($this->config->product->search);
}
/**
* Build ticket search form.
*
* @param string $queryID
* @param string $actionURL
* @access public
* @return mixed
*/
public function buildTicketSearchForm($queryID, $actionURL)
{
$this->loadModel('ticket');
$this->app->loadConfig('ticket');
$this->config->ticket->search['module'] = 'workTicket';
$this->config->ticket->search['queryID'] = $queryID;
$this->config->ticket->search['actionURL'] = $actionURL;
$this->config->ticket->search['params']['product']['values'] = array('' => '') + $this->loadModel('feedback')->getGrantProducts();
$this->config->ticket->search['params']['module']['values'] = array('' => '') + $this->loadModel('tree')->getAllModulePairs();
$grantProducts = $this->loadModel('feedback')->getGrantProducts();
$productIDlist = array_keys($grantProducts);
$this->config->ticket->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productIDlist);
$this->loadModel('search')->setSearchParams($this->config->ticket->search);
}
/**
* Get requirements by search.
*
+71
View File
@@ -0,0 +1,71 @@
<?php
/**
* The ticket view file of my module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Xin Zhou <zhouxin@cnezsoft.com>
* @package my
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
<?php js::set('mode', 'ticket');?>
<?php js::set('rawMethod', $app->rawMethod);?>
<div id='mainMenu' class="clearfix">
<div class="btn-toolbar pull-left">
<?php
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink($app->rawMethod, "mode=ticket&type=assignedtome"), "<span class='text'>{$lang->my->taskMenu->assignedToMe}</span>" . ($browseType == 'assignedtome' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($browseType == 'assignedtome' ? ' btn-active-text' : '') . "'");
?>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->user->search;?></a>
</div>
</div>
<div id='mainContent' class="main-row fade">
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='workTicket'></div>
<?php if(empty($tickets)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->ticket->noTicket;?></span>
</p>
</div>
<?php else:?>
<form class='main-table' id='opportunityForm' method='post' data-ride="table">
<table class="table has-sort-head" id='ticketList'>
<?php $vars = "browseType=$browseType&param=0&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<?php $canView = common::hasPriv('ticket', 'view');?>
<thead>
<th class="c-id"><?php common::printOrderLink('id', $orderBy, $vars, $lang->ticket->idAB);?></th>
<th class="c-product"><?php common::printOrderLink('product', $orderBy, $vars, $lang->ticket->product);?></th>
<th class='c-title'><?php common::printOrderLink('title', $orderBy, $vars, $lang->ticket->title);?></th>
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->ticket->priAB);?></th>
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->ticket->status);?></th>
<th class="c-type"><?php common::printOrderLink('type', $orderBy, $vars, $lang->ticket->type);?></th>
<th class='c-openedBy'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->ticket->createdBy);?></th>
<th class='c-openedDate'><?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->ticket->createdDate);?></th>
<th class='c-assignedTo'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->ticket->assignedTo);?></th>
<th class='c-actions'><?php echo $lang->actions;?></th>
</thead>
<tbody>
<?php foreach($tickets as $ticket): ?>
<tr>
<td class='c-id'><?php echo $canView ? html::a($this->createLink('ticket', 'view', "id={$ticket->id}"), $ticket->id) : $ticket->id;?></td>
<td class='no-wrap' title="<?php echo zget($products, $ticket->product);?>"><?php echo zget($products, $ticket->product);?></td>
<td class='no-wrap' title="<?php echo $ticket->title;?>"><?php echo $canView ? html::a($this->createLink('ticket', 'view', "id={$ticket->id}"), $ticket->title) : $ticket->title;?></td>
<td><span class='label-pri label-pri-<?php echo $ticket->pri;?>' title='<?php echo zget($lang->ticket->priList, $ticket->pri, $ticket->pri);?>'><?php echo zget($lang->ticket->priList, $ticket->pri); ?></span></td>
<td><?php echo zget($lang->ticket->statusList, $ticket->status);?></td>
<td><?php echo zget($lang->ticket->typeList, $ticket->type);?></td>
<td class='no-wrap' title="<?php echo zget($users, $ticket->openedBy);?>"><?php echo zget($users, $ticket->openedBy);?></td>
<td><?php echo $ticket->openedDate;?></td>
<td><?php echo $this->ticket->printAssignedHtml($ticket, $users);?></td>
<td class='c-actions'><?php echo $this->ticket->buildOperateBrowseMenu($ticket->id);?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
</form>
<?php endif;?>
</div>
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
+9 -1
View File
@@ -448,7 +448,15 @@ class portModel extends model
foreach($sysDataFields as $field)
{
$dataList[$field] = $this->loadModel($field)->getPairs();
if($field == 'user') $dataList[$field] = $this->loadModel($field)->getPairs('noclosed|nodeleted|noletter');
if($field == 'user')
{
$dataList[$field] = $this->loadModel($field)->getPairs('noclosed|nodeleted|noletter');
unset($dataList[$field]['']);
if(!in_array(strtolower($this->app->methodName) ,array('ajaxgettbody','ajaxgetoptions','showimport')))
{
foreach($dataList[$field] as $key => $value) $dataList[$field][$key] = $value . "(#$key)";
}
}
}
return $dataList;
-1
View File
@@ -9,4 +9,3 @@ td.acl {white-space: nowrap;}
.c-openedBy ,.c-acl ,.c-prs ,.c-common {width:110px !important;}
.c-bugs ,.c-type {width:120px !important;}
.c-release {padding-right: 20px !important;}
.c-feedback {padding-right: 20px !important;}
+1 -1
View File
@@ -226,7 +226,7 @@ class storyModel extends model
->join('assignedTo', '')
->join('mailto', ',')
->stripTags($this->config->story->editor->create['id'], $this->config->allowedTags)
->remove('files,labels,reviewer,needNotReview,newStory,uid,contactListMenu,URS,region,lane')
->remove('files,labels,reviewer,needNotReview,newStory,uid,contactListMenu,URS,region,lane,ticket')
->get();
/* Check repeat story. */