Merge branch 'sprint/185' into 'sprint/185_zxd_49693'

# Conflicts:
#   module/execution/js/kanban.js
#   module/execution/view/kanban.html.php
This commit is contained in:
李玉春
2022-02-23 05:08:23 +00:00
150 changed files with 2318 additions and 1404 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* 基本设置。Basic settings. */
$config->version = '16.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->version = '16.5'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php.
+1 -1
View File
@@ -23,4 +23,4 @@ ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason
ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`;
ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`;
UPDATE `zt_user` SET `visions`='rnd,lite';
UPDATE `zt_user` SET `visions`='rnd,lite';
@@ -36,3 +36,61 @@ $lang->action->dynamicAction->task['unlinkparenttask'] = '从父任务取消
$lang->action->dynamicAction->task['deletechildrentask'] = '删除子任务';
$lang->action->dynamicAction->task['linkparenttask'] = '关联到父任务';
$lang->action->dynamicAction->task['linkchildtask'] = '关联子任务';
$lang->action->label->createchildrenstory = "创建子目标";
$lang->action->label->linkchildstory = "关联子目标";
$lang->action->label->unlinkchildrenstory = "取消关联子目标";
$lang->action->label->linkparentstory = "关联到父目标";
$lang->action->label->unlinkparentstory = "从父目标取消关联";
$lang->action->label->deletechildrenstory = "删除子目标";
$lang->action->search->label = array();
$lang->action->search->label[''] = '';
$lang->action->search->label['created'] = $lang->action->label->created;
$lang->action->search->label['opened'] = $lang->action->label->opened;
$lang->action->search->label['changed'] = $lang->action->label->changed;
$lang->action->search->label['edited'] = $lang->action->label->edited;
$lang->action->search->label['assigned'] = $lang->action->label->assigned;
$lang->action->search->label['closed'] = $lang->action->label->closed;
$lang->action->search->label['deleted'] = $lang->action->label->deleted;
$lang->action->search->label['deletedfile'] = $lang->action->label->deletedfile;
$lang->action->search->label['editfile'] = $lang->action->label->editfile;
$lang->action->search->label['erased'] = $lang->action->label->erased;
$lang->action->search->label['undeleted'] = $lang->action->label->undeleted;
$lang->action->search->label['hidden'] = $lang->action->label->hidden;
$lang->action->search->label['commented'] = $lang->action->label->commented;
$lang->action->search->label['activated'] = $lang->action->label->activated;
$lang->action->search->label['reviewed'] = $lang->action->label->reviewed;
$lang->action->search->label['moved'] = $lang->action->label->moved;
$lang->action->search->label['confirmed'] = $lang->action->label->confirmed;
$lang->action->search->label['totask'] = $lang->action->label->totask;
$lang->action->search->label['changestatus'] = $lang->action->label->changestatus;
$lang->action->search->label['marked'] = $lang->action->label->marked;
$lang->action->search->label['linked2project'] = $lang->action->label->linked2project;
$lang->action->search->label['unlinkedfromproject'] = $lang->action->label->unlinkedfromproject;
$lang->action->search->label['linked2execution'] = $lang->action->label->linked2execution;
$lang->action->search->label['unlinkedfromexecution'] = $lang->action->label->unlinkedfromexecution;
$lang->action->search->label['started'] = $lang->action->label->started;
$lang->action->search->label['restarted'] = $lang->action->label->restarted;
$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate;
$lang->action->search->label['editestimate'] = $lang->action->label->editestimate;
$lang->action->search->label['canceled'] = $lang->action->label->canceled;
$lang->action->search->label['finished'] = $lang->action->label->finished;
$lang->action->search->label['paused'] = $lang->action->label->paused;
$lang->action->search->label['verified'] = $lang->action->label->verified;
$lang->action->search->label['login'] = $lang->action->label->login;
$lang->action->search->label['logout'] = $lang->action->label->logout;
$lang->action->label->createchildrenstory = "创建子目标";
$lang->action->label->linkchildstory = "关联子目标";
$lang->action->label->unlinkchildrenstory = "取消关联子目标";
$lang->action->label->linkparentstory = "关联到父目标";
$lang->action->label->unlinkparentstory = "从父目标取消关联";
$lang->action->label->deletechildrenstory = "删除子目标";
$lang->action->desc->createchildrenstory = '$date, 由 <strong>$actor</strong> 创建子目标 <strong>$extra</strong>。' . "\n";
$lang->action->desc->linkchildstory = '$date, 由 <strong>$actor</strong> 关联子目标 <strong>$extra</strong>。' . "\n";
$lang->action->desc->unlinkchildrenstory = '$date, 由 <strong>$actor</strong> 移除子目标 <strong>$extra</strong>。' . "\n";
$lang->action->desc->linkparentstory = '$date, 由 <strong>$actor</strong> 关联到父目标 <strong>$extra</strong>。' . "\n";
$lang->action->desc->unlinkparentstory = '$date, 由 <strong>$actor</strong> 从父目标<strong>$extra</strong>取消关联。' . "\n";
$lang->action->desc->deletechildrenstory = '$date, 由 <strong>$actor</strong> 删除子目标<strong>$extra</strong>。' . "\n";
@@ -18,6 +18,7 @@ if($config->edition != 'open')
{
$lang->navIcons['feedback'] = "<i class='icon icon-feedback'></i>";
$lang->navIcons['oa'] = "<i class='icon icon-oa'></i>";
$lang->navIcons['workflow'] = "<i class='icon icon-flow'></i>";
$lang->mainNav->feedback = $lang->navIcons['feedback'] . '反馈|feedback|browse|';
$lang->mainNav->oa = $lang->navIcons['oa'] . '办公|attend|personal|';
@@ -75,7 +76,7 @@ $lang->project->target = '目标';
$lang->kanban->menu = new stdclass();
$lang->kanban->menu->index = array('link' => "{$lang->dashboard}|project|index|project=%s");
$lang->kanban->menu->execution = array('link' => "$lang->executionKanban|project|execution|status=all&projectID=%s", 'subModule' => 'execution,task');
$lang->kanban->menu->story = array('link' => "{$lang->project->target}|projectstory|story|projectID=%s", 'subModule' => 'projectstory,tree', 'alias' => 'story,track');
$lang->kanban->menu->story = array('link' => "{$lang->project->target}|projectstory|story|projectID=%s", 'subModule' => 'projectstory,tree,story', 'alias' => 'story,track');
$lang->kanban->menu->doc = array('link' => "{$lang->doc->common}|doc|tableContents|type=project&objectID=%s", 'subModule' => 'doc');
$lang->kanban->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
$lang->kanban->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist,team');
@@ -0,0 +1,6 @@
<?php
$lang->datatable->moduleSetting = '目录设置';
$lang->datatable->showModule = '列表页是否显示目录名';
$lang->datatable->showAllModule = '是否显示完整产品目录';
$lang->datatable->showModuleList['base'] = '只显示一级目录';
$lang->datatable->showModuleList['end'] = '只显示最后一级目录';
@@ -0,0 +1,5 @@
#dataform table tbody tr:first-child{display:none!important;}
#dataform table tbody tr:nth-child(5){display:none!important;}
#dataform table tbody tr:nth-child(7){display:none!important;}
#dataform table tbody tr:nth-child(8){display:none!important;}
#dataform table tbody tr:nth-child(13){display:none!important;}
@@ -1,7 +0,0 @@
<script>
$('#dataform table tbody tr:first-child').hide();
$('#dataform table tbody tr:nth-child(5)').hide();
$('#dataform table tbody tr:nth-child(7)').hide();
$('#dataform table tbody tr:nth-child(8)').hide();
$('#dataform table tbody tr:nth-child(13)').hide();
</script>
@@ -31,7 +31,7 @@
<p>
<span class="text-muted"><?php echo $lang->execution->noExecution;?></span>
<?php if(common::hasPriv('execution', 'create')):?>
<?php echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->execution->createKanban, '', "class='btn btn-info' data-app='project'");?>
<?php echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->project->createKanban, '', "class='btn btn-info' data-app='project'");?>
<?php endif;?>
</p>
</div>
@@ -34,6 +34,7 @@
<button type='button' data-toggle='modal' data-target="#importLinesModal" class="btn btn-primary"><?php echo $lang->pasteText;?></button>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=batchCreateFields')?>
<?php include $this->app->getModuleRoot() . '/common/view/customfield.html.php';?>
<div class="divider"></div>
</div>
</div>
<?php
@@ -248,5 +249,18 @@ $(function()
$("select[id^='region']").change();
})
</script>
<?php if(isonlybody()):?>
<style>
.body-modal .main-header{padding-right:0px;}
.btn-toolbar>.dropdown{margin:0px;}
</style>
<?php $html = '<div class="divider"></div><button id="closeModal" type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>';?>
<script>$(function()
{
parent.$('#triggerModal .modal-content .modal-header .close').hide();
$('#mainContent .main-header .pull-right.btn-toolbar').append(<?php echo json_encode($html)?>);
})
</script>
<?php endif;?>
<?php include $this->app->getModuleRoot() . '/common/view/pastetext.html.php';?>
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
+24 -10
View File
@@ -41,6 +41,16 @@
<td><?php echo html::select('execution', $executions, $execution->id, "class='form-control chosen' onchange='loadAll(this.value)' required");?></td><td></td><td></td>
</tr>
<?php endif;?>
<?php if(count($regionList) > 1 or count($lanes) > 1 or empty($extra)):?>
<tr>
<th><?php echo $lang->task->region;?></th>
<td><?php echo html::select('region', $regionList, isset($regionID) ? $regionID : '', "class='form-control chosen' onchange='loadLaneGroup(this.value)' required");?>
</tr>
<tr>
<th><?php echo $lang->task->lane;?></th>
<td class='required'><?php echo html::select('otherLane', $laneList, '', "class='form-control chosen' onchange='loadAll(this.value)' required");?>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->type;?></th>
<td><?php echo html::select('type', $lang->task->typeList, $task->type, "class='form-control chosen' onchange='setOwners(this.value)' required");?></td>
@@ -199,15 +209,6 @@
</div>
</td>
</tr>
<?php if(count($regionList) > 1 or count($lanes) > 1 or empty($extra)):?>
<tr>
<th><?php echo $lang->task->region;?></th>
<td><?php echo html::select('region', $regionList, isset($regionID) ? $regionID : '', "class='form-control chosen' onchange='loadLaneGroup(this.value)' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->task->lane;?></th>
<td><?php echo html::select('otherLane', $laneList, '', "class='form-control chosen' onchange='loadAll(this.value)' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->task->desc;?></th>
<td colspan='3'>
@@ -215,7 +216,6 @@
<?php echo html::textarea('desc', htmlSpecialString($task->desc), "rows='10' class='form-control'");?>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
@@ -332,6 +332,20 @@
<?php js::set('storyPinYin', (empty($config->isINT) and class_exists('common')) ? common::convert2Pinyin($stories) : array());?>
<?php js::set('testStoryIdList', $testStoryIdList);?>
<?php js::set('executionID', $execution->id);?>
<?php if(isonlybody()):?>
<style>
.body-modal .main-header{padding-right:0px;}
.btn-toolbar>.dropdown{margin:0px;}
</style>
<?php $html = '<div class="divider"></div><button id="closeModal" type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>';?>
<script>
$(function()
{
parent.$('#triggerModal .modal-content .modal-header .close').hide();
$('#mainContent .main-header .pull-right.btn-toolbar').append(<?php echo json_encode($html)?>);
})
</script>
<?php endif;?>
<script>
$(function()
{
@@ -1,3 +1,6 @@
<script>
$('#mainMenu .btn-toolbar > a[href*="bug"], a[href*="testtask"], a[href*="testcase"], a[href*="issue"], a[href*="risk"], a[href*="storyType=requirement"]').remove();
$('#mainMenu .btn-toolbar > a[href*="bug"], a[href*="testtask"], a[href*="testcase"], a[href*="issue"], a[href*="risk"], a[href*="requirement"]').remove();
<?php if($this->config->edition != 'open'):?>
$('#mainMenu .btn-toolbar > a:first').attr('href', createLink('user', 'todocalendar', 'userID=<?php echo $user->id?>'));
<?php endif;?>
</script>
+2 -1
View File
@@ -1396,7 +1396,8 @@ class block extends control
{
$sprints = $this->dao->select('status, count(*) as sprints')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('type')->eq('sprint')
->beginIF($this->config->vision == 'lite')->andWhere('type')->eq('kanban')->fi()
->beginIF($this->config->vision == 'rnd')->andWhere('type')->eq('sprint')->fi()
->andWhere('parent')->eq($this->session->project)
->groupBy('status')
->fetchPairs();
+1
View File
@@ -169,6 +169,7 @@ $config->bug->datatable->fieldList['pri']['title'] = 'P';
$config->bug->datatable->fieldList['pri']['fixed'] = 'left';
$config->bug->datatable->fieldList['pri']['width'] = '50';
$config->bug->datatable->fieldList['pri']['required'] = 'no';
$config->bug->datatable->fieldList['pri']['name'] = $lang->bug->pri;
$config->bug->datatable->fieldList['confirmed']['title'] = 'confirmedAB';
$config->bug->datatable->fieldList['confirmed']['fixed'] = 'left';
+1 -1
View File
@@ -1768,7 +1768,7 @@ class bug extends control
if(!$this->post->bugIDList) return print(js::locate($this->session->bugList, 'parent'));
$bugIDList = array_unique($$this->post->bugIDList);
$bugIDList = array_unique($this->post->bugIDList);
$bugs = $this->dao->select('id, title, status, resolvedBy, openedBuild')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id');
$this->qa->setMenu($this->products, $productID, $branch);
+1 -1
View File
@@ -32,7 +32,7 @@
</div>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th><?php echo $lang->bug->product;?></th>
<th><?php echo $lang->bug->title;?></th>
<th class='c-status'><?php echo $lang->bug->statusAB;?></th>
+1 -1
View File
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-status'> <?php echo $lang->priAB;?></th>
<th class='c-status' title=<?php echo $lang->pri;?>> <?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->bug->title;?></th>
<th class='c-user'> <?php echo $lang->openedByAB;?></th>
<th class='c-user'> <?php echo $lang->bug->resolvedBy;?></th>
+1 -1
View File
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'> <?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class="text-left"><?php echo $lang->story->title;?></th>
<th class='c-user'> <?php echo $lang->openedByAB;?></th>
<th class='c-user'> <?php echo $lang->assignedToAB;?></th>
+1 -1
View File
@@ -89,7 +89,7 @@ tbody tr td:first-child input {display: none;}
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-id'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-id' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='c-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-id text-right'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
+1 -1
View File
@@ -124,7 +124,7 @@ js::set('flow', $config->global->flow);
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
+2
View File
@@ -146,6 +146,8 @@ $lang->assignedToAB = 'AssignedTo';
$lang->typeAB = 'Type';
$lang->nameAB = 'Name';
$lang->pri = 'Priority';
$lang->common->common = 'Common Module';
$lang->my->common = 'My';
$lang->program->common = 'Program';
+2
View File
@@ -146,6 +146,8 @@ $lang->assignedToAB = '指派';
$lang->typeAB = '类型';
$lang->nameAB = '名称';
$lang->pri = '优先级';
$lang->common->common = '公有模块';
$lang->my->common = '地盘';
$lang->program->common = '项目集';
+1 -1
View File
@@ -359,7 +359,7 @@ class commonModel extends model
{
echo js::locate($denyLink);
}
exit;
helper::end();
}
/**
+3 -4
View File
@@ -1304,8 +1304,7 @@ class execution extends control
$this->view->executionID = $executionID;
$this->view->projectID = $projectID;
$this->view->project = $project;
$this->display();
exit;
return $this->display();
}
$name = '';
@@ -2069,6 +2068,7 @@ class execution extends control
$this->view->groupBy = $groupBy;
$this->view->productID = $productID;
$this->view->branchID = $branchID;
$this->view->projectID = $this->loadModel('task')->getProjectID($execution->id);
$this->view->allPlans = $allPlans;
$this->view->kanbanData = $kanbanData;
$this->view->executionActions = $executionActions;
@@ -2464,8 +2464,7 @@ class execution extends control
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
}
echo js::confirm($tips . sprintf($this->lang->execution->confirmDelete, $this->executions[$executionID]), $this->createLink('execution', 'delete', "executionID=$executionID&confirm=yes"));
exit;
return print(js::confirm($tips . sprintf($this->lang->execution->confirmDelete, $this->executions[$executionID]), $this->createLink('execution', 'delete', "executionID=$executionID&confirm=yes")));
}
else
{
+23 -10
View File
@@ -533,7 +533,7 @@ function renderBugItem(item, $item, col)
if(scaleSize <= 1)
{
var $actions = $item.find('.actions');
if(!$actions.length && item.menus && item.menus.length)
if(!$actions.length && (priv.canEditBug || priv.canResolveBug || priv.canConfirmBug || priv.canCopyBug || priv.canToStoryBug))
{
$actions = $([
'<div class="actions">',
@@ -597,7 +597,7 @@ function renderTaskItem(item, $item, col)
if(scaleSize <= 1)
{
var $actions = $item.find('.actions');
if(!$actions.length && item.menus && item.menus.length)
if(!$actions.length && (priv.canEditTask || priv.canRecordEstimateTask || priv.canCreateTask || priv.canCancelTask))
{
$actions = $([
'<div class="actions">',
@@ -1063,16 +1063,28 @@ function createTaskMenu(options)
{
var $card = options.$trigger.closest('.kanban-item');
var task = $card.data('item');
var items = [];
$.each(task.menus, function()
{
var item = {label: this.label, icon: this.icon, url: this.url, attrs: {'data-toggle': 'modal', 'data-type': 'iframe'}};
if(this.size) item.attrs['data-width'] = this.size;
items.push(item);
});
if(priv.canEditTask) items.push({label: taskLang.edit, icon: 'edit', url: createLink('task', 'edit', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canRecordEstimateTask) items.push({label: executionLang.effort, icon: 'time', url: createLink('task', 'recordEstimate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canCreateTask) items.push({label: taskLang.copy, icon: 'copy', url: createLink('task', 'create', 'projectID=' + projectID + '&storyID=' + '0' + '&moduleID=' + '0' + '&taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canCancelTask && (task.$col.type == 'wait' || task.$col.type == 'developing' || task.$col.type == 'pause')) items.push({label: taskLang.cancel, icon: 'cancel', url: createLink('task', 'cancel', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
return items;
}
/**
* Create bug menu
* @returns {Object[]}
*/
function createBugMenu(options)
{
var $card = options.$trigger.closest('.kanban-item');
var bug = $card.data('item');
var items = [];
if(priv.canEditBug) items.push({label: bugLang.edit, icon: 'edit', url: createLink('bug', 'edit', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canResolveBug && (bug.$col.type == 'unconfirmed' || bug.$col.type == 'confirmed' || bug.$col.type == 'fixing' || bug.$col.type == 'fixed')) items.push({label: bugLang.resolve, icon: 'checked', url: createLink('bug', 'resolve', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canConfirmBug && (bug.$col.type === 'unconfirmed')) items.push({label: bugLang.confirmBug, icon: 'ok', url: createLink('bug', 'confirmbug', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canCopyBug) items.push({label: bugLang.copy, icon: 'copy', url: createLink('bug', 'create', 'productID=' + productID + '&branch=' + '' + '&extras=bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canToStoryBug && (bug.$col.type != 'closed')) items.push({label: bugLang.toStory, icon: 'lightbulb', url: createLink('story', 'create', 'product=' + productID + '&branch=' + '0' + '&module=' + '0' + '&story=' + '0' + '&execution=' + '0' + '&bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
return items;
}
@@ -1084,6 +1096,7 @@ window.menuCreators =
columnCreate: createColumnCreateMenu,
task: createTaskMenu,
story: createStoryMenu,
bug: createBugMenu,
};
/**
+15
View File
@@ -271,6 +271,21 @@ function renderColumnCount($count, count, col)
{
var text = count + '/' + (col.limit < 0 ? '<i class="icon icon-infinite"></i>' : col.limit);
$count.html(text + '<i class="icon icon-arrow-up"></i>');
if(col.limit != -1 && col.limit < count)
{
$count.parents('.title').parent('.kanban-header-col').css('background-color', '#F6A1A1');
$count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 200);
$count.css('color', '#E33030');
if(!$count.parent().find('.error').length) $count.parent().find('.include-last').after("<span class='error text-grey'><icon class='icon icon-help' title='" + kanbanLang.limitExceeded + "'></icon></span>");
}
else
{
$count.parents('.title').parent('.kanban-header-col').css('background-color', 'transparent');
$count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 120);
$count.css('color', '#8B91A2');
$count.parent().find('.error').remove();
}
}
/**
+1 -1
View File
@@ -80,7 +80,7 @@
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='c-pri'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-date text-center'><?php common::printOrderLink('deadline', $orderBy, $vars, $lang->bug->deadlineAB);?></th>
+1 -1
View File
@@ -25,7 +25,7 @@
</div>
</body>
</html>
<?php exit;?>
<?php helper::end();?>
<?php endif;?>
<?php include '../../common/view/header.html.php';?>
+1 -1
View File
@@ -112,7 +112,7 @@
</div>
</th>
<th class="c-id-sm"><?php echo $lang->task->id;?></th>
<th class="c-pri"><?php echo $lang->priAB;?></th>
<th class="c-pri" title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
<th class="c-name text-left"><?php echo $lang->task->name;?></th>
<th class="c-status"><?php echo $lang->task->status;?></th>
<th class="text-left c-user"><?php echo $lang->task->assignedTo;?></th>
+1 -1
View File
@@ -38,7 +38,7 @@ var browseType = '<?php echo $browseType;?>';
<?php echo $lang->idAB;?>
</th>
<th class='c-severity'> <?php echo $lang->bug->severityAB;?></th>
<th class='c-pri'> <?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
<th><?php echo $lang->bug->title;?></th>
<th class='c-status'><?php echo $lang->bug->statusAB;?></th>
<th class='c-pri-box <?php echo in_array('pri', $requiredFields) ? 'required' : ''?>'><?php echo $lang->task->pri;?></th>
+1 -1
View File
@@ -33,7 +33,7 @@
<?php echo $lang->idAB;?>
</th>
<th class='c-name'><?php echo $lang->execution->name ?></th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
<th class='w-p30'><?php echo $lang->task->name;?></th>
<th class='c-user'><?php echo $lang->task->assignedTo;?></th>
<th class='c-hour'><?php echo $lang->task->leftAB;?></th>
+29 -24
View File
@@ -46,6 +46,7 @@ js::set('displayCards', $execution->displayCards);
js::set('fluidBoard', $execution->fluidBoard);
js::set('colorListLang', $lang->kanbancard->colorList);
js::set('colorList', $this->config->kanban->cardColorList);
js::set('projectID', $projectID);
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
$canEditRegion = commonModel::hasPriv('kanban', 'editRegion');
@@ -65,30 +66,34 @@ $hasBugButton = ($canCreateBug or $canBatchCreateBug);
js::set('priv',
array(
'canCreateTask' => $canCreateTask,
'canBatchCreateTask' => $canBatchCreateTask,
'canCreateBug' => $canCreateBug,
'canBatchCreateBug' => $canBatchCreateBug,
'canCreateStory' => $canCreateStory,
'canBatchCreateStory' => $canBatchCreateStory,
'canLinkStory' => $canLinkStory,
'canLinkStoryByPlan' => $canLinkStoryByPlan,
'canAssignTask' => common::hasPriv('task', 'assignto'),
'canAssignStory' => common::hasPriv('story', 'assignto'),
'canFinishTask' => common::hasPriv('task', 'finish'),
'canPauseTask' => common::hasPriv('task', 'pause'),
'canCancelTask' => common::hasPriv('task', 'cancel'),
'canCloseTask' => common::hasPriv('task', 'close'),
'canActivateTask' => common::hasPriv('task', 'activate'),
'canStartTask' => common::hasPriv('task', 'start'),
'canAssignBug' => common::hasPriv('bug', 'assignto'),
'canConfirmBug' => common::hasPriv('bug', 'confirmBug'),
'canActivateBug' => common::hasPriv('bug', 'activate'),
'canEditStory' => common::hasPriv('story', 'edit'),
'canChangeStory' => common::hasPriv('story', 'change'),
'canCreateTask' => common::hasPriv('task', 'create'),
'canBatchCreateTask' => common::hasPriv('task', 'batchCreate'),
'canUnlinkStory' => common::hasPriv('execution', 'unlinkStory'),
'canCreateTask' => $canCreateTask,
'canBatchCreateTask' => $canBatchCreateTask,
'canCreateBug' => $canCreateBug,
'canBatchCreateBug' => $canBatchCreateBug,
'canCreateStory' => $canCreateStory,
'canBatchCreateStory' => $canBatchCreateStory,
'canLinkStory' => $canLinkStory,
'canLinkStoryByPlan' => $canLinkStoryByPlan,
'canAssignBug' => common::hasPriv('bug', 'assignto'),
'canConfirmBug' => common::hasPriv('bug', 'confirmBug'),
'canResolveBug' => common::hasPriv('bug', 'resolve'),
'canCopyBug' => common::hasPriv('bug', 'create'),
'canEditBug' => common::hasPriv('bug', 'edit'),
'canActivateBug' => common::hasPriv('bug', 'activate'),
'canAssignTask' => common::hasPriv('task', 'assignto'),
'canFinishTask' => common::hasPriv('task', 'finish'),
'canPauseTask' => common::hasPriv('task', 'pause'),
'canCancelTask' => common::hasPriv('task', 'cancel'),
'canCloseTask' => common::hasPriv('task', 'close'),
'canActivateTask' => common::hasPriv('task', 'activate'),
'canStartTask' => common::hasPriv('task', 'start'),
'canEditTask' => common::hasPriv('task', 'edit'),
'canRecordEstimateTask' => common::hasPriv('task', 'recordEstimate'),
'canToStoryBug' => common::hasPriv('story', 'create'),
'canAssignStory' => common::hasPriv('story', 'assignto'),
'canEditStory' => common::hasPriv('story', 'edit'),
'canChangeStory' => common::hasPriv('story', 'change'),
'canUnlinkStory' => common::hasPriv('execution', 'unlinkStory'),
)
);
js::set('hasStoryButton', $hasStoryButton);
+1 -1
View File
@@ -39,7 +39,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
<th><?php echo $lang->story->title;?></th>
<th class='c-object'><?php echo $lang->story->product;?></th>
<th class='c-module'><?php echo $lang->story->module;?></th>
+1 -1
View File
@@ -199,7 +199,7 @@
<?php if($canOrder):?>
<th class='c-sort {sorter:false}'><?php common::printOrderLink('order', $orderBy, $vars, $lang->execution->orderAB);?></th>
<?php endif;?>
<th class='c-pri {sorter:false}'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri {sorter:false}' title=<?php echo $lang->execution->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-name {sorter:false}'><?php common::printOrderLink('title', $orderBy, $vars, $lang->execution->storyTitle);?></th>
<th class='c-category {sorter:false}'><?php common::printOrderLink('category', $orderBy, $vars, $lang->story->category);?></th>
<th class='c-user {sorter:false}'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
+1 -1
View File
@@ -24,7 +24,7 @@
<thead>
<tr>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title=<?php echo $lang->execution->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
+2 -1
View File
@@ -30,7 +30,8 @@ class extension extends control
$this->view->position[] = $this->lang->extension->browse;
$this->view->error = sprintf($this->lang->extension->noticeOkFile, str_replace('\\', '/', $statusFile));
return $this->display('extension', 'safe');
$this->display('extension', 'safe');
helper::end();
}
}
+8 -8
View File
@@ -30,12 +30,12 @@
?>
</div>
</div>
<div class='panel panel-sm'>
<div class='panel-heading'><?php echo $lang->extension->byCategory;?></div>
<div class='panel-body'>
<?php $moduleTree ? print($moduleTree) : print($lang->extension->errorGetModules);?>
<?php if($moduleTree):?>
<div class='panel panel-sm'>
<div class='panel-heading'><?php echo $lang->extension->byCategory;?></div>
<div class='panel-body'><?php print($moduleTree);?></div>
</div>
</div>
<?php endif;?>
</div>
<div class='main-col main-content'>
<div class='cell'>
@@ -49,8 +49,8 @@
<div class='detail'>
<div class='detail-title'>
<small class='pull-right text-important'>
<?php
if($latestRelease and $latestRelease->releaseVersion != $currentRelease->releaseVersion)
<?php
if($latestRelease and $latestRelease->releaseVersion != $currentRelease->releaseVersion)
{
printf($lang->extension->latest, $latestRelease->viewLink, $latestRelease->releaseVersion, $latestRelease->zentaoCompatible);
}?>
@@ -67,7 +67,7 @@
echo "{$lang->extension->author}: {$extension->author} ";
echo "{$lang->extension->downloads}: {$extension->downloads} ";
echo "{$lang->extension->compatible}: {$lang->extension->compatibleList[$currentRelease->compatible]} ";
echo " {$lang->extension->depends}: ";
if(!empty($currentRelease->depends))
{
+1 -2
View File
@@ -136,8 +136,7 @@ class git extends control
$parsedObjects['tasks'] = array_unique($parsedObjects['tasks']);
$parsedObjects['bugs'] = array_unique($parsedObjects['bugs']);
$this->view->parsedObjects = $parsedObjects;
$this->display();
exit;
return $this->display();
}
}
+23 -4
View File
@@ -74,12 +74,12 @@ class kanban extends control
* @access public
* @return void
*/
public function editSpace($spaceID)
public function editSpace($spaceID, $type = '')
{
$this->loadModel('action');
if(!empty($_POST))
{
$changes = $this->kanban->updateSpace($spaceID);
$changes = $this->kanban->updateSpace($spaceID, $type);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
@@ -89,8 +89,27 @@ class kanban extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
$this->view->space = $this->kanban->getSpaceById($spaceID);
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
$space = $this->kanban->getSpaceById($spaceID);
$typeList = $this->lang->kanbanspace->typeList;
if($space->type == 'cooperation' or $space->type == 'public') unset($typeList['private']);
if($space->type == 'private' and ($type == 'cooperation' or $type == 'public'))
{
$team = $space->whitelist;
}
else
{
$team = $space->team;
}
$this->view->spaceID = $spaceID;
$this->view->space = $space;
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
$this->view->typeList = $typeList;
$this->view->type = $type;
$this->view->team = $team;
$this->view->defaultType = $type == '' ? $space->type : $type;
$this->display();
}
+12
View File
@@ -0,0 +1,12 @@
/**
* When type change.
*
* @param int spaceID
* @param string type
* @access public
* @return void
*/
function changeType(spaceID, type)
{
location.href = createLink('kanban', 'editSpace', 'spaceID=' + spaceID + '&type=' + type);
}
+4
View File
@@ -271,6 +271,10 @@ $lang->kanbanspace->featureBar['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->featureBar['public'] = 'Public Space';
$lang->kanbanspace->featureBar['involved'] = 'Involved';
$lang->kanbanspace->typeList['private'] = 'Private Space';
$lang->kanbanspace->typeList['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->typeList['public'] = 'Public Space';
$lang->kanbancolumn = new stdclass();
$lang->kanbancolumn->name = $lang->kanban->columnName;
$lang->kanbancolumn->limit = $lang->kanban->WIPCount;
+4
View File
@@ -271,6 +271,10 @@ $lang->kanbanspace->featureBar['cooperation'] = '协作空间';
$lang->kanbanspace->featureBar['public'] = '公共空间';
$lang->kanbanspace->featureBar['involved'] = '我参与的';
$lang->kanbanspace->typeList['private'] = '私人空间';
$lang->kanbanspace->typeList['cooperation'] = '协作空间';
$lang->kanbanspace->typeList['public'] = '公共空间';
$lang->kanbancolumn = new stdclass();
$lang->kanbancolumn->name = $lang->kanban->columnName;
$lang->kanbancolumn->limit = $lang->kanban->WIPCount;
+12 -1
View File
@@ -1754,7 +1754,7 @@ class kanbanModel extends model
* @access public
* @return array
*/
public function updateSpace($spaceID)
public function updateSpace($spaceID, $type = '')
{
$spaceID = (int)$spaceID;
$oldSpace = $this->getSpaceById($spaceID);
@@ -1767,6 +1767,8 @@ class kanbanModel extends model
->remove('uid,contactListMenu')
->get();
if($type == 'cooperation' or $type == 'public') $space->whitelist = '';
$space = $this->loadModel('file')->processImgURL($space, $this->config->kanban->editor->editspace['id'], $this->post->uid);
$this->dao->update(TABLE_KANBANSPACE)->data($space)
@@ -1775,6 +1777,15 @@ class kanbanModel extends model
->where('id')->eq($spaceID)
->exec();
if($oldSpace->type == 'private' and ($type == 'cooperation' or $type == 'public'))
{
$kanbanList = $this->dao->select('id,team,whitelist')->from(TABLE_KANBAN)->where('space')->eq($spaceID)->andWhere('deleted')->eq('0')->fetchAll('id');
foreach($kanbanList as $id => $kanbanData)
{
$this->dao->update(TABLE_KANBAN)->set('team')->eq($kanbanData->whitelist)->set('whitelist')->eq('')->where('id')->eq($id)->andWhere('deleted')->eq('0')->exec();
}
}
if(!dao::isError())
{
$this->file->saveUpload('kanbanspace', $spaceID);
+8 -3
View File
@@ -18,12 +18,17 @@
</div>
<form class='form-indicator main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->kanbanspace->type;?></th>
<td><?php echo html::select('type', $typeList, $defaultType, "onchange='changeType($spaceID, this.value)' class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->kanbanspace->name;?></th>
<td><?php echo html::input('name', $space->name, "class='form-control'");?></td>
<td></td>
</tr>
<?php if($space->type != 'private'):?>
<?php if($space->type != 'private' or $type == 'cooperation' or $type == 'public'):?>
<tr>
<th><?php echo $lang->kanbanspace->owner;?></th>
<td><?php echo html::select('owner', $users, $space->owner, "class='form-control chosen'");?></td>
@@ -32,7 +37,7 @@
<th><?php echo $lang->kanbanspace->team;?></th>
<td colspan='2'>
<div class="input-group">
<?php echo html::select('team[]', $users, $space->team, "class='form-control chosen' multiple data-drop_direction='down'");?>
<?php echo html::select('team[]', $users, $team, "class='form-control chosen' multiple data-drop_direction='down'");?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
@@ -45,7 +50,7 @@
<?php echo html::textarea('desc', $space->desc, "rows='10' class='form-control'");?>
</td>
</tr>
<?php if($space->type == 'private'):?>
<?php if($space->type == 'private' and $type != 'cooperation' and $type != 'public'):?>
<tr id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, $space->whitelist, 'class="form-control chosen" multiple');?></td>
+1 -1
View File
@@ -40,7 +40,7 @@
<?php echo $lang->idAB;?>
</th>
<th class='c-name'><?php echo $lang->kanban->name;?></th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='c-name'><?php echo $lang->kanbancard->name;?></th>
<th class='c-user'><?php echo $lang->kanbancard->assignedTo;?></th>
<th class='c-date'><?php echo $lang->kanbancard->end;?></th>
+2
View File
@@ -94,6 +94,7 @@ $lang->misc->feature->downloadFile = 'Download introduction';
$lang->misc->feature->tutorialDesc = '<p>ZenTao 15.0 has new functions, and you know how to use it through the "<strong>Tutorial</strong>".</p><p>Click your [<span style="color: #0c60e1">Avatar-Theme-Young Blue</span>] to set it.</p>';
$lang->misc->feature->themeDesc = '<p>ZenTao 15.0+ a new "Youth Blue" theme, the pages are more beautiful and the experience is more friendly.</p><p>Click your [<span style="color: #0c60e1">Avatar-Theme-Young Blue</span>] to set it.</p>';
$lang->misc->releaseDate['16.5'] = '2022-02-22';
$lang->misc->releaseDate['16.4'] = '2022-02-15';
$lang->misc->releaseDate['16.3'] = '2022-01-26';
$lang->misc->releaseDate['16.2'] = '2022-01-17';
@@ -168,6 +169,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['16.5'][] = array('title' => 'Fix bug, merge all code to one package', 'desc' => '');
$lang->misc->feature->all['16.4'][] = array('title' => 'Implement JIRA import function and improve plug-in extension mechanism.', 'desc' => '');
$lang->misc->feature->all['16.3'][] = array('title' => 'Kanban adds related plan/release/version/iteration functions, and the detail experience is optimized, fix bugs.', 'desc' => '');
$lang->misc->feature->all['16.2'][] = array('title' => 'Add kanban model project, fix bugs.', 'desc' => '');
+2
View File
@@ -94,6 +94,7 @@ $lang->misc->feature->downloadFile = '下载新版本功能介绍文档';
$lang->misc->feature->tutorialDesc = "<p>禅道15系列新增了多项功能,您可以通过“<strong>新手引导教程</strong>”快速了解禅道的基本使用方法。</p><p>通过鼠标经过 [<span style='color: #0c60e1'>头像-新手引导</span>],点击新手引导,即可进入新手引导教程。</p>";
$lang->misc->feature->themeDesc = "<p>禅道15系列上线了全新的“青春蓝”主题,页面呈现更加美观,体验更加友好。</p><p>通过鼠标经过 [<span style='color: #0c60e1'>头像-主题-青春蓝</span>],点击青春蓝,即可设置成功。</p>";
$lang->misc->releaseDate['16.5'] = '2022-02-22';
$lang->misc->releaseDate['16.4'] = '2022-02-15';
$lang->misc->releaseDate['16.3'] = '2022-01-26';
$lang->misc->releaseDate['16.2'] = '2022-01-17';
@@ -168,6 +169,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['16.5'][] = array('title' => '实现一码多面,多个禅道版本集成到一个包中。', 'desc' => '');
$lang->misc->feature->all['16.4'][] = array('title' => '实现JIRA导入功能,完善插件扩展机制。', 'desc' => '');
$lang->misc->feature->all['16.3'][] = array('title' => '看板增加关联计划/发布/版本/迭代功能,细节体验优化。', 'desc' => '');
$lang->misc->feature->all['16.2'][] = array('title' => '新增专业研发看板,可以创建看板模型项目,修复Bug。', 'desc' => '');
+3 -3
View File
@@ -72,7 +72,7 @@
<?php if($canOrder):?>
<th class='w-70px'><?php common::printOrderLink('order', $orderBy, $vars, $lang->productplan->updateOrder);?></th>
<?php endif;?>
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-150px text-left'><?php common::printOrderLink('module', $orderBy, $vars, $lang->story->module);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
@@ -153,7 +153,7 @@
<th class='c-id text-left'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px' title=<?php echo $lang->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->bug->assignedToAB);?></th>
@@ -215,7 +215,7 @@
<th class='c-id text-left'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px' title=<?php echo $lang->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='c-user'> <?php common::printOrderLink('finishedBy', $orderBy, $vars, $lang->task->finishedByAB);?></th>
<th class='c-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->task->assignedToAB);?></th>
+1 -1
View File
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->bug->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->bug->assignedToAB;?></th>
+1 -1
View File
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='c-plan'><?php echo $lang->story->plan;?></th>
<th class='c-module'><?php echo $lang->story->module;?></th>
<th class='text-left'><?php echo $lang->story->title;?></th>
+1 -1
View File
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->task->name;?></th>
<th class='c-user'><?php echo $lang->task->finishedByAB;?></th>
<th class='c-user'><?php echo $lang->task->assignedToAB;?></th>
+1
View File
@@ -41,6 +41,7 @@ $lang->my->requirement = "My {$lang->URCommon}";
$lang->my->testtask = 'My Test Task';
$lang->my->testcase = 'My Case';
$lang->my->storyConcept = 'Story Concept';
$lang->my->pri = 'Priority';
$lang->my->indexAction = 'My Index';
$lang->my->calendarAction = 'My Calendar';
+1
View File
@@ -41,6 +41,7 @@ $lang->my->requirement = "我的{$lang->URCommon}";
$lang->my->testtask = '我的测试单';
$lang->my->testcase = '我的用例';
$lang->my->storyConcept = $config->URAndSR ? '默认需求概念组合' : '默认需求概念';
$lang->my->pri = '优先级';
$lang->my->indexAction = '地盘仪表盘';
$lang->my->calendarAction = '我的日程';
+1 -1
View File
@@ -58,7 +58,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri w-40px'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri w-40px' title=<?php echo $lang->task->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->my->name);?></th>
<th class='c-product'> <?php common::printOrderLink('productTitle', $orderBy, $vars, $lang->story->product);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
+1 -1
View File
@@ -58,7 +58,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title=<?php echo $lang->my->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->my->name);?></th>
<th class='c-product'> <?php common::printOrderLink('productTitle', $orderBy, $vars, $lang->story->product);?></th>
<th class='c-plan'> <?php common::printOrderLink('plan', $orderBy, $vars, $lang->story->plan);?></th>
+1 -1
View File
@@ -48,7 +48,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title=<?php echo $lang->task->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-name'><?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<?php if($config->systemMode == 'new'):?>
<th class='c-project'><?php common::printOrderLink('project', $orderBy, $vars, $lang->my->projects);?></th>
+1 -1
View File
@@ -48,7 +48,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title=<?php echo $lang->testcase->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<?php if($type == 'assigntome'):?>
<th class='c-task'> <?php common::printOrderLink('task', $orderBy, $vars, $lang->testtask->common);?></th>
+1 -1
View File
@@ -74,7 +74,7 @@
<th class="c-date"> <?php common::printOrderLink('date', $orderBy, $vars, $lang->todo->date);?></th>
<th class="c-type"> <?php common::printOrderLink('type', $orderBy, $vars, $lang->todo->type);?></th>
<?php $style = $this->app->clientLang == 'en' ? "style='width:80px'" : '';?>
<th class="c-pri" <?php echo $style;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class="c-pri" <?php echo $style;?> title=<?php echo $lang->todo->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class="c-name"> <?php common::printOrderLink('name', $orderBy, $vars, $lang->todo->name);?></th>
<th class="c-user"> <?php common::printOrderLink('assignedBy', $orderBy, $vars, $lang->todo->assignedBy);?></th>
<th class="c-begin"> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
+8 -8
View File
@@ -626,8 +626,8 @@ class productplanModel extends model
$plan->status = isset($data->status[$planID]) ? $data->status[$planID] : $oldPlans[$planID]->status;
$plan->parent = $oldPlans[$planID]->parent;
if(empty($plan->title)) die(js::alter(sprintf($this->lang->productplan->errorNoTitle, $planID)));
if($plan->begin > $plan->end and !empty($plan->end)) die(js::alert(sprintf($this->lang->productplan->beginGeEnd, $planID)));
if(empty($plan->title)) return print(js::alter(sprintf($this->lang->productplan->errorNoTitle, $planID)));
if($plan->begin > $plan->end and !empty($plan->end)) return print(js::alert(sprintf($this->lang->productplan->beginGeEnd, $planID)));
if($plan->begin == '') $plan->begin = $this->config->productplan->future;
if($plan->end == '') $plan->end = $this->config->productplan->future;
@@ -639,7 +639,7 @@ class productplanModel extends model
$plan->{$extendField->field} = htmlSpecialString($plan->{$extendField->field});
$message = $this->checkFlowRule($extendField, $plan->{$extendField->field});
if($message) die(js::alert($message));
if($message) return print(js::alert($message));
}
$plans[$planID] = $plan;
@@ -656,11 +656,11 @@ class productplanModel extends model
$parent = isset($plans[$parentID]) ? $plans[$parentID] : $this->getByID($parentID);
if($parent->begin != $this->config->productplan->future and $plan->begin != $this->config->productplan->future and $plan->begin < $parent->begin)
{
die(js::alert(sprintf($this->lang->productplan->beginLetterParentTip, $planID, $plan->begin, $parent->begin)));
return print(js::alert(sprintf($this->lang->productplan->beginLetterParentTip, $planID, $plan->begin, $parent->begin)));
}
elseif($parent->end != $this->config->productplan->future and $plan->end != $this->config->productplan->future and $plan->end > $parent->end)
{
die(js::alert(sprintf($this->lang->productplan->endGreaterParentTip, $planID, $plan->end, $parent->end)));
return print(js::alert(sprintf($this->lang->productplan->endGreaterParentTip, $planID, $plan->end, $parent->end)));
}
}
elseif($parentID == -1 and $plan->begin != $this->config->productplan->future)
@@ -674,8 +674,8 @@ class productplanModel extends model
if($childPlan->begin < $minBegin and $minBegin != $this->config->productplan->future) $minBegin = $childPlan->begin;
if($childPlan->end > $maxEnd and $maxEnd != $this->config->productplan->future) $maxEnd = $childPlan->end;
}
if($minBegin < $plan->begin and $minBegin != $this->config->productplan->future) die(js::alert(sprintf($this->lang->productplan->beginGreaterChildTip, $planID, $plan->begin, $minBegin)));
if($maxEnd > $plan->end and $maxEnd != $this->config->productplan->future) die(js::alert(sprintf($this->lang->productplan->endLetterChildTip, $planID, $plan->end, $maxEnd)));
if($minBegin < $plan->begin and $minBegin != $this->config->productplan->future) return print(js::alert(sprintf($this->lang->productplan->beginGreaterChildTip, $planID, $plan->begin, $minBegin)));
if($maxEnd > $plan->end and $maxEnd != $this->config->productplan->future) return print(js::alert(sprintf($this->lang->productplan->endLetterChildTip, $planID, $plan->end, $maxEnd)));
}
$change = common::createChanges($oldPlans[$planID], $plan);
@@ -683,7 +683,7 @@ class productplanModel extends model
{
if($parentID > 0 and !isset($parents[$parentID])) $parents[$parentID] = $parentID;
$this->dao->update(TABLE_PRODUCTPLAN)->data($plan)->autoCheck()->where('id')->eq($planID)->exec();
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
$changes[$planID] = $change;
}
}
+1 -1
View File
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->bug->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->bug->assignedToAB;?></th>
+1 -1
View File
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
<th class='c-plan'><?php echo $lang->story->plan;?></th>
<th class='c-module'><?php echo $lang->story->module;?></th>
<th class='text-left'><?php echo $lang->story->title;?></th>
+4 -4
View File
@@ -157,7 +157,7 @@
<th class='c-id text-left'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px' title='<?php echo $lang->pri;?>'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='w-70px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<?php else:?>
@@ -172,7 +172,7 @@
<?php if($canOrder):?>
<th class='w-70px'><?php common::printOrderLink('order', $orderBy, $vars, $lang->productplan->updateOrder);?></th>
<?php endif;?>
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px' title='<?php echo $lang->pri;?>'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-150px text-left'><?php common::printOrderLink('module', $orderBy, $vars, $lang->story->module);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
@@ -452,7 +452,7 @@
<th class='c-id text-left'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px' title='<?php echo $lang->pri;?>'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<?php else:?>
@@ -464,7 +464,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->bug->assignedToAB);?></th>
+18 -18
View File
@@ -243,10 +243,10 @@ class program extends control
{
/* Only when all subprograms and subprojects are closed can the program be closed. */
$hasUnfinished = $this->program->hasUnfinished($program);
if($hasUnfinished) die(js::error($this->lang->program->closeErrorMessage));
if($hasUnfinished) return print(js::error($this->lang->program->closeErrorMessage));
$changes = $this->project->close($programID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -255,7 +255,7 @@ class program extends control
}
$this->executeHooks($programID);
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$this->view->title = $this->lang->program->close;
@@ -281,7 +281,7 @@ class program extends control
if(!empty($_POST))
{
$changes = $this->project->start($programID, 'program');
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -291,7 +291,7 @@ class program extends control
$this->loadModel('common')->syncPPEStatus($programID);
$this->executeHooks($programID);
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$this->view->title = $this->lang->program->start;
@@ -317,14 +317,14 @@ class program extends control
if(!empty($_POST))
{
$changes = $this->project->activate($programID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
$actionID = $this->action->create('program', $programID, 'Activated', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$newBegin = date('Y-m-d');
@@ -355,7 +355,7 @@ class program extends control
if(!empty($_POST))
{
$changes = $this->project->suspend($programID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -363,7 +363,7 @@ class program extends control
$this->action->logHistory($actionID, $changes);
}
$this->executeHooks($programID);
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$this->view->title = $this->lang->program->suspend;
@@ -389,19 +389,19 @@ class program extends control
if($childrenCount)
{
if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return $this->send(array('result' => 'fail', 'message' => 'Cannot delete the program has children'));
die(js::alert($this->lang->program->hasChildren));
return print(js::alert($this->lang->program->hasChildren));
}
$productCount = $this->dao->select('count(*) as count')->from(TABLE_PRODUCT)->where('program')->eq($programID)->andWhere('deleted')->eq(0)->fetch('count');
if($productCount) die(js::alert($this->lang->program->hasProduct));
if($productCount) return print(js::alert($this->lang->program->hasProduct));
$program = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($programID)->fetch();
if($confirm == 'no') die(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'delete', "programID=$programID&confirm=yes")));
if($confirm == 'no') return print(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'delete', "programID=$programID&confirm=yes")));
$this->dao->update(TABLE_PROGRAM)->set('deleted')->eq(1)->where('id')->eq($programID)->exec();
$this->loadModel('action')->create('program', $programID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
die(js::reload('parent'));
echo js::reload('parent');
}
/**
@@ -508,7 +508,7 @@ class program extends control
{
if($confirm == 'no')
{
die(js::confirm($this->lang->program->confirmDelete, $this->inlink('unlinkStakeholder', "stakeholderID=$stakeholderID&programID=$programID&confirm=yes")));
return print(js::confirm($this->lang->program->confirmDelete, $this->inlink('unlinkStakeholder', "stakeholderID=$stakeholderID&programID=$programID&confirm=yes")));
}
else
{
@@ -518,7 +518,7 @@ class program extends control
$this->loadModel('user')->updateUserView($programID, 'program', array($account));
$this->updateChildUserView($programID, $account);
die(js::reload('parent'));
return print(js::reload('parent'));
}
}
@@ -537,7 +537,7 @@ class program extends control
if($confirm == 'no')
{
die(js::confirm($this->lang->program->confirmBatchUnlink, $this->inlink('batchUnlinkStakeholders', "programID=$programID&stakeholderIDList=$stakeholderIDList&confirm=yes")));
return print(js::confirm($this->lang->program->confirmBatchUnlink, $this->inlink('batchUnlinkStakeholders', "programID=$programID&stakeholderIDList=$stakeholderIDList&confirm=yes")));
}
else
{
@@ -547,7 +547,7 @@ class program extends control
$this->loadModel('user')->updateUserView($programID, 'program', $account);
$this->updateChildUserView($programID, $account);
die(js::reload('parent'));
return print(js::reload('parent'));
}
}
@@ -723,7 +723,7 @@ class program extends control
{
$programID = (int)$programID;
$program = $this->program->getByID($programID);
if(!$program) die(js::error($this->lang->notFound) . js::locate('back'));
if(!$program) return print(js::error($this->lang->notFound) . js::locate('back'));
echo $this->fetch('program', 'product', "programID=$programID");
}
+3 -3
View File
@@ -11,12 +11,12 @@ class programModel extends model
{
echo(js::alert($this->lang->program->accessDenied));
if(!$this->server->http_referer) die(js::locate(helper::createLink('my', 'index')));
if(!$this->server->http_referer) return print(js::locate(helper::createLink('my', 'index')));
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('my', 'index')));
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(helper::createLink('my', 'index')));
die(js::locate('back'));
echo js::locate('back');
}
/**
+1 -1
View File
@@ -25,7 +25,7 @@
</div>
</body>
</html>
<?php exit;?>
<?php helper::end();?>
<?php endif;?>
<?php include '../../common/view/header.html.php';?>
+1 -1
View File
@@ -627,7 +627,7 @@ class programplanModel extends model
/* If child plans has milestone, update parent plan set milestone eq 0 . */
if($parentID and $milestone) $this->dao->update(TABLE_PROJECT)->set('milestone')->eq(0)->where('id')->eq($parentID)->exec();
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
}
}
+31 -31
View File
@@ -178,7 +178,7 @@ class project extends control
->andWhere('t1.type')->eq('execution')
->andWhere('t1.account')->eq($account)
->fetchPairs();
if(empty($executionMembers)) die();
if(empty($executionMembers)) return;
$executionNames = '';
$count = 0;
@@ -198,7 +198,7 @@ class project extends control
{
$this->lang->project->unlinkExecutionMember = sprintf($this->lang->project->unlinkExecutionMember, count($executionMembers), $executionNames, $this->lang->project->etc);
}
die($this->lang->project->unlinkExecutionMember);
echo $this->lang->project->unlinkExecutionMember;
}
/**
@@ -238,7 +238,7 @@ class project extends control
$this->project->setMenu($projectID);
$project = $this->project->getByID($projectID);
if(empty($project) || $project->type != 'project') die(js::error($this->lang->notFound) . js::locate('back'));
if(empty($project) || $project->type != 'project') return print(js::error($this->lang->notFound) . js::locate('back'));
if(!$projectID) $this->locate($this->createLink('project', 'browse'));
setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
@@ -355,7 +355,7 @@ class project extends control
{
$programTitle = $this->post->programTitle;
$this->setting->setItem($this->app->user->account . '.project.programTitle', $programTitle);
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$status = $this->setting->getItem('owner=' . $this->app->user->account . '&module=project&key=programTitle');
@@ -665,12 +665,13 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
}
die(js::locate($this->session->projectList, 'parent'));
return print(js::locate($this->session->projectList, 'parent'));
}
if($this->app->tab == 'program') $this->loadModel('program')->setMenu(0);
$projectIdList = $this->post->projectIdList ? $this->post->projectIdList : die(js::locate($this->session->projectList, 'parent'));
if(!$this->post->projectIdList) return print(js::locate($this->session->projectList, 'parent'));
$projectIdList = $this->post->projectIdList;
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
/* Get program list. */
@@ -709,7 +710,7 @@ class project extends control
if(empty($project) || strpos('scrum,waterfall,kanban', $project->model) === false)
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
die(js::error($this->lang->notFound) . js::locate($this->createLink('project', 'browse')));
return print(js::error($this->lang->notFound) . js::locate($this->createLink('project', 'browse')));
}
$this->project->setMenu($projectID);
@@ -791,9 +792,9 @@ class project extends control
{
$_POST['project'] = $projectID;
$groupID = $this->group->create();
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $groupID));
die(js::closeModal('parent.parent'));
return print(js::closeModal('parent.parent'));
}
$this->view->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->create;
@@ -1296,7 +1297,7 @@ class project extends control
*/
public function unlinkMember($projectID, $userID, $confirm = 'no', $removeExecution = 'no')
{
if($confirm == 'no') die(js::confirm($this->lang->project->confirmUnlinkMember, $this->inlink('unlinkMember', "projectID=$projectID&userID=$userID&confirm=yes")));
if($confirm == 'no') return print(js::confirm($this->lang->project->confirmUnlinkMember, $this->inlink('unlinkMember', "projectID=$projectID&userID=$userID&confirm=yes")));
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
@@ -1319,7 +1320,7 @@ class project extends control
}
return $this->send($response);
}
die(js::locate($this->inlink('team', "projectID=$projectID"), 'parent'));
echo js::locate($this->inlink('team', "projectID=$projectID"), 'parent');
}
/**
@@ -1388,8 +1389,8 @@ class project extends control
if(!empty($_POST))
{
$this->group->updateUser($groupID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('group', 'browse'), 'parent'));
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
return print(js::locate($this->createLink('group', 'browse'), 'parent'));
}
$group = $this->group->getById($groupID);
@@ -1432,8 +1433,8 @@ class project extends control
$group = $this->group->getByID($groupID);
$_POST['project'] = $group->project;
$this->group->copy($groupID);
if(dao::isError()) die(js::error(dao::getError()));
die(js::closeModal('parent.parent', 'this'));
if(dao::isError()) return print(js::error(dao::getError()));
return print(js::closeModal('parent.parent', 'this'));
}
$this->view->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->copy;
@@ -1456,7 +1457,7 @@ class project extends control
if(!empty($_POST))
{
$this->group->update($groupID);
die(js::closeModal('parent.parent', 'this'));
return print(js::closeModal('parent.parent', 'this'));
}
$this->view->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->edit;
@@ -1481,7 +1482,7 @@ class project extends control
if(!empty($_POST))
{
$changes = $this->project->start($projectID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -1501,7 +1502,7 @@ class project extends control
if($project->status == 'wait' || $project->status == 'suspended')
{
$changes = $this->project->start($projectID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -1514,7 +1515,7 @@ class project extends control
$this->loadModel('common')->syncPPEStatus($projectID);
$this->executeHooks($projectID);
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$this->view->title = $this->lang->project->start;
@@ -1539,7 +1540,7 @@ class project extends control
if(!empty($_POST))
{
$changes = $this->project->suspend($projectID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -1547,7 +1548,7 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
$this->executeHooks($projectID);
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$this->view->title = $this->lang->project->suspend;
@@ -1573,7 +1574,7 @@ class project extends control
if(!empty($_POST))
{
$changes = $this->project->close($projectID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -1581,7 +1582,7 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
$this->executeHooks($projectID);
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$this->view->title = $this->lang->project->close;
@@ -1609,7 +1610,7 @@ class project extends control
if(!empty($_POST))
{
$changes = $this->project->activate($projectID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -1617,7 +1618,7 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
$this->executeHooks($projectID);
die(js::reload('parent.parent'));
return print(js::reload('parent.parent'));
}
$newBegin = date('Y-m-d');
@@ -1648,8 +1649,7 @@ class project extends control
if($confirm == 'no')
{
$project = $this->project->getByID($projectID);
echo js::confirm(sprintf($this->lang->project->confirmDelete, $project->name), $this->createLink('project', 'delete', "projectID=$projectID&confirm=yes"));
die();
return print(js::confirm(sprintf($this->lang->project->confirmDelete, $project->name), $this->createLink('project', 'delete', "projectID=$projectID&confirm=yes")));
}
else
{
@@ -1669,7 +1669,7 @@ class project extends control
if(empty($executionIdList))
{
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
die(js::locate($url, 'parent'));
return print(js::locate($url, 'parent'));
}
$this->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->in(array_keys($executionIdList))->exec();
@@ -1679,7 +1679,7 @@ class project extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
$this->session->set('project', '');
die(js::locate($url, 'parent'));
return print(js::locate($url, 'parent'));
}
}
@@ -1862,7 +1862,7 @@ class project extends control
$oldTopPGM = $this->loadModel('program')->getTopByID($project->parent);
$newTopPGM = $this->program->getTopByID($programID);
if($oldTopPGM == $newTopPGM) die();
if($oldTopPGM == $newTopPGM) return;
$response = array();
$response['result'] = true;
@@ -1884,6 +1884,6 @@ class project extends control
$response['message'] = $multiLinkedProducts;
$response['multiLinkedProjects'] = $multiLinkedProjects;
}
die(json_encode($response));
echo json_encode($response);
}
}
+4 -4
View File
@@ -1223,10 +1223,10 @@ class projectModel extends model
$projects[$projectID]->{$extendField->field} = htmlSpecialString($projects[$projectID]->{$extendField->field});
$message = $this->checkFlowRule($extendField, $projects[$projectID]->{$extendField->field});
if($message) die(js::alert($message));
if($message) hepler::end(js::alert($message));
}
}
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) helper::end(js::error(dao::getError()));
foreach($projects as $projectID => $project)
{
@@ -1244,7 +1244,7 @@ class projectModel extends model
->where('id')->eq($projectID)
->exec();
if(dao::isError()) die(js::error('project#' . $projectID . dao::getError(true)));
if(dao::isError()) helper::end(js::error('project#' . $projectID . dao::getError(true)));
if(!dao::isError())
{
$linkedProducts = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs();
@@ -1941,7 +1941,7 @@ class projectModel extends model
->beginIF($status != 'all' and $status != 'undone')->andWhere('t2.status')->eq($status)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
->andWhere('t2.deleted')->eq('0')
->andWhere('t1.vision')->eq($this->config->vision)
->andWhere('t2.vision')->eq($this->config->vision)
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
+1 -1
View File
@@ -57,7 +57,7 @@
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='c-pri'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title=<?php echo $lang->project->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
+1 -1
View File
@@ -31,7 +31,7 @@ $formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm';
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->bug->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->bug->resolvedBy;?></th>
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->story->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->assignedToAB;?></th>
+1 -1
View File
@@ -85,7 +85,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class="text-left"><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px text-right'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
+2 -2
View File
@@ -37,7 +37,7 @@ class projectStory extends control
public function story($projectID = 0, $productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->products = $this->loadModel('product')->getProductPairsByProject($projectID);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'moduleName=project&activeMenu=story&projectID=' . $projectID)));
if(empty($this->products)) return print($this->locate($this->createLink('product', 'showErrorNone', 'moduleName=project&activeMenu=story&projectID=' . $projectID)));
echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID");
}
@@ -140,7 +140,7 @@ ETO;
}
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
die($html);
echo $html;
}
/**
+1 -1
View File
@@ -20,7 +20,7 @@ class qa extends control
public function index($locate = 'auto', $productID = 0, $projectID = 0)
{
$products = $this->loadModel('product')->getProductPairsByProject($projectID, 'noclosed');
if(empty($products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=index")));
if(empty($products)) return print($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=index")));
if($locate == 'yes') $this->locate($this->createLink('bug', 'browse'));
$productID = $this->product->saveState($productID, $products);
+1 -1
View File
@@ -26,7 +26,7 @@ class qaModel extends model
if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false and $productID != 0 and !defined('TUTORIAL'))
{
$this->app->loadLang('product');
die(js::error($this->lang->product->accessDenied) . js::locate('back'));
return print(js::error($this->lang->product->accessDenied) . js::locate('back'));
}
$branch = ($this->cookie->preBranch !== '' and $branch === '') ? $this->cookie->preBranch : $branch;
+16 -16
View File
@@ -162,7 +162,7 @@ class release extends control
{
$releaseID = (int)$releaseID;
$release = $this->release->getByID($releaseID, true);
if(!$release) die(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index')));
if(!$release) return print(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index')));
if($type == 'story') $this->session->set('storyList', $this->app->getURI(true), 'product');
if($type == 'bug' or $type == 'leftBug') $this->session->set('bugList', $this->app->getURI(true), 'qa');
@@ -224,8 +224,8 @@ class release extends control
/**
* Notify for release.
*
* @param int $releaseID
*
* @param int $releaseID
* @access public
* @return void
*/
@@ -235,7 +235,7 @@ class release extends control
{
if(isset($_POST['notify']))
{
$notify = implode(',', $this->post->notify);
$notify = implode(',', $this->post->notify);
$this->dao->update(TABLE_RELEASE)->set('notify')->eq($notify)->where('id')->eq($releaseID)->exec();
$this->release->sendmail($releaseID);
@@ -244,7 +244,7 @@ class release extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
$this->view->release = $this->release->getById($releaseID);
$this->view->actions = $this->loadModel('action')->getList('release', $releaseID);
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
@@ -263,7 +263,7 @@ class release extends control
{
if($confirm == 'no')
{
die(js::confirm($this->lang->release->confirmDelete, $this->createLink('release', 'delete', "releaseID=$releaseID&confirm=yes")));
return print(js::confirm($this->lang->release->confirmDelete, $this->createLink('release', 'delete', "releaseID=$releaseID&confirm=yes")));
}
else
{
@@ -297,7 +297,7 @@ class release extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
$locateLink = $this->session->releaseList ? $this->session->releaseList : inlink('browse', "productID={$release->product}");
die(js::locate($locateLink, 'parent'));
return print(js::locate($locateLink, 'parent'));
}
}
@@ -404,7 +404,7 @@ class release extends control
}
$html = "<html><head><meta charset='utf-8'><title>{$this->post->fileName}</title><style>table, th, td{font-size:12px; border:1px solid gray; border-collapse:collapse;}</style></head><body>$html</body></html>";
die($this->fetch('file', 'sendDownHeader', array('fileName' => $this->post->fileName, 'html', $html)));
return print($this->fetch('file', 'sendDownHeader', array('fileName' => $this->post->fileName, 'html', $html)));
}
$this->display();
@@ -427,7 +427,7 @@ class release extends control
if(!empty($_POST['stories']))
{
$this->release->linkStory($releaseID);
die(js::locate(inlink('view', "releaseID=$releaseID&type=story"), 'parent'));
return print(js::locate(inlink('view', "releaseID=$releaseID&type=story"), 'parent'));
}
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'product');
@@ -512,7 +512,7 @@ class release extends control
}
return $this->send($response);
}
die(js::reload('parent'));
echo js::reload('parent');
}
/**
@@ -525,7 +525,7 @@ class release extends control
public function batchUnlinkStory($releaseID)
{
$this->release->batchUnlinkStory($releaseID);
die(js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=story"), 'parent'));
echo js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=story"), 'parent');
}
/**
@@ -546,7 +546,7 @@ class release extends control
if(!empty($_POST['bugs']))
{
$this->release->linkBug($releaseID, $type);
die(js::locate(inlink('view', "releaseID=$releaseID&type=$type"), 'parent'));
return print(js::locate(inlink('view', "releaseID=$releaseID&type=$type"), 'parent'));
}
$this->session->set('bugList', inlink('view', "releaseID=$releaseID&type=$type&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'qa');
@@ -643,7 +643,7 @@ class release extends control
}
return $this->send($response);
}
die(js::reload('parent'));
echo js::reload('parent');
}
/**
@@ -657,7 +657,7 @@ class release extends control
public function batchUnlinkBug($releaseID, $type = 'bug')
{
$this->release->batchUnlinkBug($releaseID, $type);
die(js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=$type"), 'parent'));
echo js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=$type"), 'parent');
}
/**
@@ -671,8 +671,8 @@ class release extends control
public function changeStatus($releaseID, $status)
{
$this->release->changeStatus($releaseID, $status);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('release', $releaseID, 'changestatus', '', $status);
die(js::reload('parent'));
echo js::reload('parent');
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ $formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm';
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->bug->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->bug->resolvedBy;?></th>
+1 -1
View File
@@ -27,7 +27,7 @@
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->story->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->assignedToAB;?></th>
+1 -1
View File
@@ -85,7 +85,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class="text-left"><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px text-right'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
+17 -17
View File
@@ -26,7 +26,7 @@ class repo extends control
if(stripos(",$disFuncs,", ',exec,') !== false or stripos(",$disFuncs,", ',shell_exec,') !== false)
{
echo js::alert($this->lang->repo->error->useless);
die(js::locate('back'));
return print(js::locate('back'));
}
$this->projectID = $this->session->project ? $this->session->project : 0;
@@ -61,7 +61,7 @@ class repo extends control
$this->repo->setMenu($this->repos, $repoID);
}
if(empty($this->repos) and $this->methodName != 'create') die($this->locate($this->repo->createLink('create', "objectID=$objectID")));
if(empty($this->repos) and $this->methodName != 'create') return print($this->locate($this->repo->createLink('create', "objectID=$objectID")));
}
/**
@@ -216,7 +216,7 @@ class repo extends control
*/
public function delete($repoID, $objectID = 0, $confirm = 'no')
{
if($confirm == 'no') die(js::confirm($this->lang->repo->notice->delete, $this->repo->createLink('delete', "repoID=$repoID&objectID=$objectID&confirm=yes")));
if($confirm == 'no') return print(js::confirm($this->lang->repo->notice->delete, $this->repo->createLink('delete', "repoID=$repoID&objectID=$objectID&confirm=yes")));
$relationID = $this->dao->select('id')->from(TABLE_RELATION)
->where('extra')->eq($repoID)
@@ -228,15 +228,15 @@ class repo extends control
$jobs = $this->dao->select('*')->from(TABLE_JOB)->where('repo')->eq($repoID)->andWhere('deleted')->eq('0')->fetchAll();
if($jobs) $error .= ($error ? '\n' : '') . $this->lang->repo->error->linkedJob;
if($error) die(js::alert($error));
if($error) return print(js::alert($error));
$this->dao->delete()->from(TABLE_REPO)->where('id')->eq($repoID)->exec();
$this->dao->delete()->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->exec();
$this->dao->delete()->from(TABLE_REPOFILES)->where('repo')->eq($repoID)->exec();
$this->dao->delete()->from(TABLE_REPOBRANCH)->where('repo')->eq($repoID)->exec();
if(dao::isError()) die(js::error(dao::getError()));
die(js::reload('parent'));
if(dao::isError()) return print(js::error(dao::getError()));
echo js::reload('parent');
}
/**
@@ -907,8 +907,8 @@ class repo extends control
{
set_time_limit(0);
$repo = $this->repo->getRepoByID($repoID);
if(empty($repo)) die();
if($repo->synced) die('finish');
if(empty($repo)) return;
if($repo->synced) return print('finish');
$this->commonAction($repoID);
$this->scm->setEngine($repo);
@@ -979,7 +979,7 @@ class repo extends control
if(empty($branchID))
{
$this->repo->markSynced($repoID);
die('finish');
return print('finish');
}
}
}
@@ -1000,8 +1000,8 @@ class repo extends control
{
set_time_limit(0);
$repo = $this->repo->getRepoByID($repoID);
if(empty($repo)) die();
if(strpos($repo->SCM, 'Git') === false) die('finish');
if(empty($repo)) return;
if(strpos($repo->SCM, 'Git') === false) return print('finish');
if($branch) $branch = base64_decode($branch);
$this->scm->setEngine($repo);
@@ -1030,7 +1030,7 @@ class repo extends control
setcookie("syncBranch", $branch, 0, $this->config->webRoot, '', $this->config->cookieSecure, true);
$this->repo->markSynced($repoID);
die('finish');
return print('finish');
}
$this->dao->update(TABLE_REPO)->set('commits=commits + ' . $commitCount)->where('id')->eq($repoID)->exec();
@@ -1083,7 +1083,7 @@ class repo extends control
public function ajaxGetSVNDirs($repoID, $path = '')
{
$repo = $this->repo->getRepoByID($repoID);
if($repo->SCM != 'Subversion') die(json_encode(array()));
if($repo->SCM != 'Subversion') return print(json_encode(array()));
$path = $this->repo->decodePath($path);
$dirs = array();
@@ -1099,7 +1099,7 @@ class repo extends control
$dirs['/'] = $this->repo->encodePath($path);
foreach($tags as $dirPath => $dirName) $dirs[$dirPath] = $this->repo->encodePath($dirPath);
}
die(json_encode($dirs));
return print(json_encode($dirs));
}
/**
@@ -1122,7 +1122,7 @@ class repo extends control
}
$reposHtml .= '</div></div></div>';
die($reposHtml);
return print($reposHtml);
}
/**
@@ -1167,7 +1167,7 @@ class repo extends control
$options .= "<option value='{$project->id}' data-name='{$project->name}'>{$project->name_with_namespace}</option>";
}
die($options);
return print($options);
}
/**
@@ -1193,7 +1193,7 @@ class repo extends control
}
$branchesHtml .= '</div></div></div>';
die($branchesHtml);
return print($branchesHtml);
}
/**
+2 -2
View File
@@ -46,13 +46,13 @@ class repoModel extends model
if(empty($repo))
{
echo(js::alert($this->lang->repo->error->noFound));
die(js::locate('back'));
return print(js::locate('back'));
}
if(!$this->checkPriv($repo))
{
echo(js::alert($this->lang->repo->error->accessDenied));
die(js::locate('back'));
return print(js::locate('back'));
}
}
+2 -1
View File
@@ -369,6 +369,7 @@ class report extends control
$this->view->dept = $dept;
$this->view->userID = $userID;
$this->view->months = $this->report->getYearMonths($year);
die($this->display());
$this->display();
}
}
+3 -2
View File
@@ -311,8 +311,8 @@ class reportModel extends model
$project[$execution->projectname]['execution'][$name]['count'] = 0;
$project[$execution->projectname]['execution'][$name]['manhour'] = 0;
$workload[$member]['total']['count'] = 0;
$workload[$member]['total']['manhour'] = 0;
$workload[$member]['total']['count'] = 0;
$workload[$member]['total']['manhour'] = 0;
}
}
$workload[$member]['task']['project'] = $project;
@@ -390,6 +390,7 @@ class reportModel extends model
$workload[$user]['total']['count'] = isset($workload[$user]['total']['count']) ? $workload[$user]['total']['count'] + 1 : 1;
$workload[$user]['total']['manhour'] = isset($workload[$user]['total']['manhour']) ? $workload[$user]['total']['manhour'] + $task->left : $task->left;
}
$workload[$user]['task']['project'] = $project;
}
}
+7 -7
View File
@@ -73,21 +73,21 @@ class search extends control
$actionURL = $this->post->actionURL;
$parsedURL = parse_url($actionURL);
if(isset($parsedURL['host'])) die();
if(isset($parsedURL['host'])) return;
if($this->config->requestType != 'GET')
{
$path = $parsedURL['path'];
$path = str_replace($this->config->webRoot, '', $path);
if(strpos($path, '.') !== false) $path = substr($path, 0, strpos($path, '.'));
if(preg_match("/^\w+{$this->config->requestFix}\w+/", $path) == 0) die();
if(preg_match("/^\w+{$this->config->requestFix}\w+/", $path) == 0) return;
}
else
{
$query = $parsedURL['query'];
if(preg_match("/^{$this->config->moduleVar}=\w+\&{$this->config->methodVar}=\w+/", $query) == 0) die();
if(preg_match("/^{$this->config->moduleVar}=\w+\&{$this->config->methodVar}=\w+/", $query) == 0) return;
}
die(js::locate($actionURL, 'parent'));
echo js::locate($actionURL, 'parent');
}
/**
@@ -125,8 +125,8 @@ class search extends control
public function deleteQuery($queryID)
{
$this->search->deleteQuery($queryID);
if(dao::isError()) die(js::error(dao::getError()));
die('success');
if(dao::isError()) return print(js::error(dao::getError()));
echo 'success';
}
/**
@@ -149,7 +149,7 @@ class search extends control
if(empty($queryID)) continue;
$html .= '<li>' . html::a("javascript:executeQuery({$queryID})", $queryName . (common::hasPriv('search', 'deleteQuery') ? '<i class="icon icon-close"></i>' : ''), '', "class='label user-query' data-query-id='$queryID'") . '</li>';
}
die($html);
echo $html;
}
/**
+1 -1
View File
@@ -389,7 +389,7 @@ class searchModel extends model
public function deleteQuery($queryID)
{
$this->dao->delete()->from(TABLE_USERQUERY)->where('id')->eq($queryID)->andWhere('account')->eq($this->app->user->account)->exec();
die('success');
echo 'success';
}
/**
+1 -1
View File
@@ -183,7 +183,7 @@ class settingModel extends model
$owner = 'system,' . ($account ? $account : '');
$records = $this->dao->select('*')->from(TABLE_CONFIG)
->where('owner')->in($owner)
->andWhere('vision')->in(array('', $this->config->vision))
->beginIF(!defined('IN_UPGRADE'))->andWhere('vision')->in(array('', $this->config->vision))->fi()
->orderBy('id')
->fetchAll('id');
if(!$records) return array();
+2 -2
View File
@@ -210,7 +210,7 @@ class sonarqube extends control
*/
public function delete($sonarqubeID, $confirm = 'no')
{
if($confirm != 'yes') die(js::confirm($this->lang->sonarqube->confirmDelete, inlink('delete', "sonarqubeID=$sonarqubeID&confirm=yes")));
if($confirm != 'yes') return print(js::confirm($this->lang->sonarqube->confirmDelete, inlink('delete', "sonarqubeID=$sonarqubeID&confirm=yes")));
$oldSonarQube = $this->loadModel('pipeline')->getByID($sonarqubeID);
$this->loadModel('action');
@@ -319,7 +319,7 @@ class sonarqube extends control
*/
public function deleteProject($sonarqubeID, $projectKey, $confirm = 'no')
{
if($confirm != 'yes') die(js::confirm($this->lang->sonarqube->confirmDeleteProject, inlink('deleteProject', "sonarqubeID=$sonarqubeID&projectKey=$projectKey&confirm=yes")));
if($confirm != 'yes') return print(js::confirm($this->lang->sonarqube->confirmDeleteProject, inlink('deleteProject', "sonarqubeID=$sonarqubeID&projectKey=$projectKey&confirm=yes")));
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
$projectKey = str_replace('*', '-', $projectKey);
+18 -18
View File
@@ -24,7 +24,7 @@ class sso extends control
$locate = empty($referer) ? getWebRoot() : base64_decode($referer);
$this->app->loadConfig('sso');
if(!$this->config->sso->turnon) die($this->locate($locate));
if(!$this->config->sso->turnon) return print($this->locate($locate));
$userIP = $this->server->remote_addr;
$code = $this->config->sso->code;
@@ -92,7 +92,7 @@ class sso extends control
if($this->loadModel('user')->isLogon())
{
if($this->session->user && $this->session->user->account == $user->account) die($this->locate($locate));
if($this->session->user && $this->session->user->account == $user->account) return print($this->locate($locate));
}
$this->user->cleanLocked($user->account);
@@ -116,7 +116,8 @@ class sso extends control
$this->session->set('user', $user);
$this->app->user = $this->session->user;
$this->loadModel('action')->create('user', $user->id, 'login');
die($this->locate($locate));
return print($this->locate($locate));
}
}
$this->locate($this->createLink('user', 'login', empty($referer) ? '' : "referer=$referer"));
@@ -170,7 +171,7 @@ class sso extends control
*/
public function ajaxSetConfig()
{
if(!$this->app->user->admin) die('deny');
if(!$this->app->user->admin) return print('deny');
if($_POST)
{
@@ -181,8 +182,8 @@ class sso extends control
$ssoConfig->key = trim($this->post->key);
$this->loadModel('setting')->setItems('system.sso', $ssoConfig);
if(dao::isError()) die('fail');
die('success');
if(dao::isError()) return print('fail');
echo 'success';
}
}
@@ -195,19 +196,19 @@ class sso extends control
*/
public function bind($referer = '')
{
if(!$this->session->ssoData) die();
if(!$this->session->ssoData) return;
$ssoData = $this->session->ssoData;
$userIP = $this->server->remote_addr;
$code = $this->config->sso->code;
$key = $this->config->sso->key;
if($ssoData->auth != md5($code . $userIP . $ssoData->token . $key))die();
if($ssoData->auth != md5($code . $userIP . $ssoData->token . $key)) return;
$this->loadModel('user');
if($_POST)
{
$user = $this->sso->bind();
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
/* Authorize him and save to session. */
$user->rights = $this->user->authorize($user->account);
@@ -219,7 +220,7 @@ class sso extends control
$this->app->user = $this->session->user;
$this->loadModel('action')->create('user', $user->id, 'login');
unset($_SESSION['ssoData']);
die(js::locate(helper::safe64Decode($referer), 'parent'));
return print(js::locate(helper::safe64Decode($referer), 'parent'));
}
$this->view->title = $this->lang->sso->bind;
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
@@ -237,7 +238,7 @@ class sso extends control
{
if(!$this->sso->checkKey()) return false;
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
die(json_encode($users));
echo json_encode($users);
}
/**
@@ -250,7 +251,7 @@ class sso extends control
{
if(!$this->sso->checkKey()) return false;
$users = $this->sso->getBindUsers();
die(json_encode($users));
echo json_encode($users);
}
/**
@@ -265,8 +266,8 @@ class sso extends control
{
$this->dao->update(TABLE_USER)->set('ranzhi')->eq('')->where('ranzhi')->eq($this->post->ranzhiAccount)->exec();
$this->dao->update(TABLE_USER)->set('ranzhi')->eq($this->post->ranzhiAccount)->where('account')->eq($this->post->zentaoAccount)->exec();
if(dao::isError()) die(dao::getError());
die('success');
if(dao::isError()) return print(dao::getError());
return print('success');
}
}
@@ -282,8 +283,8 @@ class sso extends control
{
$result = $this->sso->createUser();
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $result['id']));
if($result['status'] != 'success') die($result['data']);
die('success');
if($result['status'] != 'success') return print($result['data']);
return print('success');
}
}
@@ -303,7 +304,7 @@ class sso extends control
$datas = array();
$datas['task'] = $this->dao->select("id, name")->from(TABLE_TASK)->where('assignedTo')->eq($account)->andWhere('status')->in('wait,doing')->andWhere('deleted')->eq(0)->fetchPairs();
$datas['bug'] = $this->dao->select("id, title")->from(TABLE_BUG)->where('assignedTo')->eq($account)->andWhere('status')->eq('active')->andWhere('deleted')->eq(0)->fetchPairs();
die(json_encode($datas));
echo json_encode($datas);
}
/**
@@ -426,6 +427,5 @@ class sso extends control
$this->view->title = $this->lang->sso->deny;
$this->view->message = $message;
$this->display('sso', 'error');
die();
}
}
+3 -3
View File
@@ -48,10 +48,10 @@ class ssoModel extends model
$data = fixer::input('post')->get();
if($data->bindType == 'bind')
{
if(empty($data->bindPassword))die(js::alert($this->lang->sso->bindNoPassword));
if(empty($data->bindPassword)) return print(js::alert($this->lang->sso->bindNoPassword));
$password = md5($data->bindPassword);
$user = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($data->bindUser)->andWhere('password')->eq($password)->andWhere('deleted')->eq('0')->fetch();
if(empty($user))die(js::alert($this->lang->sso->bindNoUser));
if(empty($user)) return print(js::alert($this->lang->sso->bindNoUser));
$user->ranzhi = $this->session->ssoData->account;
$this->dao->update(TABLE_USER)->set('ranzhi')->eq($user->ranzhi)->where('id')->eq($user->id)->exec();
}
@@ -59,7 +59,7 @@ class ssoModel extends model
{
if(!$this->loadModel('user')->checkPassword()) return;
$user = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($data->account)->fetch();
if($user) die(js::alert($this->lang->sso->bindHasAccount));
if($user) return print(js::alert($this->lang->sso->bindHasAccount));
$user = new stdclass();
$user->account = $data->account;
+2 -2
View File
@@ -173,13 +173,13 @@ class stage extends control
if($confirm == 'no')
{
die(js::confirm($this->lang->stage->confirmDelete, inlink('delete', "stageID=$stageID&confirm=yes")));
return print(js::confirm($this->lang->stage->confirmDelete, inlink('delete', "stageID=$stageID&confirm=yes")));
}
else
{
$this->stage->delete(TABLE_STAGE, $stageID);
die(js::reload('parent'));
return print(js::reload('parent'));
}
}
}
+11 -11
View File
@@ -105,7 +105,7 @@ class stakeholder extends control
{
$stakeholderList = $this->stakeholder->batchCreate($projectID);
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $stakeholderList));
die(js::locate($this->createLink('stakeholder', 'browse', "projectID=$projectID"), 'parent'));
return print(js::locate($this->createLink('stakeholder', 'browse', "projectID=$projectID"), 'parent'));
}
if($this->app->tab == 'program')
@@ -206,7 +206,7 @@ class stakeholder extends control
{
$members = $this->loadModel('user')->getTeamMemberPairs($projectID, 'project');
}
die(html::select('user', $members, $user, "class='form-control chosen'"));
echo html::select('user', $members, $user, "class='form-control chosen'");
}
/**
@@ -232,7 +232,7 @@ class stakeholder extends control
$users = $this->loadModel('user')->getPairs('noclosed');
$companyUsers = array('' => '') + array_diff($users, $members);
die(html::select('user', $companyUsers, $user, "class='form-control chosen'"));
echo html::select('user', $companyUsers, $user, "class='form-control chosen'");
}
/**
@@ -245,7 +245,7 @@ class stakeholder extends control
{
$users = $this->loadModel('user')->getPairs('noclosed|outside|noletter');
die(html::select('user', $users, '', "class='form-control chosen' onchange=changeUser(this.value);"));
echo html::select('user', $users, '', "class='form-control chosen' onchange=changeUser(this.value);");
}
/**
@@ -288,7 +288,7 @@ class stakeholder extends control
$partakeList = array_merge($insideList, $outsideList);
die(json_encode(array('begin' => $begin, 'realBegin' => $realBegin, 'status' => $status, 'situation' => $situation, 'partakeList' => $partakeList)));
echo json_encode(array('begin' => $begin, 'realBegin' => $realBegin, 'status' => $status, 'situation' => $situation, 'partakeList' => $partakeList));
}
/**
@@ -303,7 +303,7 @@ class stakeholder extends control
{
if($confirm == 'no')
{
die(js::confirm($this->lang->stakeholder->confirmDelete, inLink('delete', "userID=$userID&confirm=yes")));
return print(js::confirm($this->lang->stakeholder->confirmDelete, inLink('delete', "userID=$userID&confirm=yes")));
}
else
{
@@ -316,7 +316,7 @@ class stakeholder extends control
{
$this->loadModel('project')->updateInvolvedUserView($stakeholder->objectID, $stakeholder->user);
}
die(js::reload('parent'));
return print(js::reload('parent'));
}
}
@@ -393,8 +393,8 @@ class stakeholder extends control
if(!empty($_POST))
{
$result = $this->stakeholder->communicate($userID);
if(dao::isError()) die(js::error(dao::getError()));
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
if(dao::isError()) return print(js::error(dao::getError()));
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
}
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->communicate;
@@ -418,9 +418,9 @@ class stakeholder extends control
if(!empty($_POST))
{
$expectID = $this->stakeholder->expect($user->id);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
die(js::closeModal('parent.parent', 'this'));
return print(js::closeModal('parent.parent', 'this'));
}
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->communicate;
+1
View File
@@ -60,6 +60,7 @@ $config->story->datatable->fieldList['pri']['title'] = 'priAB';
$config->story->datatable->fieldList['pri']['fixed'] = 'left';
$config->story->datatable->fieldList['pri']['width'] = '50';
$config->story->datatable->fieldList['pri']['required'] = 'no';
$config->story->datatable->fieldList['pri']['name'] = $this->lang->story->pri;
$config->story->datatable->fieldList['title']['title'] = 'title';
$config->story->datatable->fieldList['title']['fixed'] = 'left';
+58 -54
View File
@@ -83,7 +83,7 @@ class story extends control
if(isset($fromObjectID))
{
$fromObject = $this->loadModel($fromObjectName)->getById($fromObjectID);
if(!$fromObject) die(js::error($this->lang->notFound) . js::locate('back', 'parent'));
if(!$fromObject) return print(js::error($this->lang->notFound) . js::locate('back', 'parent'));
$this->view->$fromObjectIDKey = $fromObjectID;
$this->view->$fromObjectName = $fromObject;
@@ -222,7 +222,7 @@ class story extends control
$users = $this->user->getPairs('pdfirst|noclosed|nodeleted');
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch);
if(empty($moduleOptionMenu)) die(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
if(empty($moduleOptionMenu)) return print(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
/* Init vars. */
$source = '';
@@ -437,7 +437,7 @@ class story extends control
if($storyID and !empty($mails))
{
$this->story->subdivide($storyID, $stories);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
}
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $stories));
@@ -644,7 +644,7 @@ class story extends control
if(!empty($_POST))
{
$changes = $this->story->update($storyID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
$action = !empty($changes) ? 'Edited' : 'Commented';
@@ -657,9 +657,9 @@ class story extends control
$this->executeHooks($storyID);
if(isonlybody()) die(js::reload('parent.parent'));
if(isonlybody()) return print(js::reload('parent.parent'));
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success', 'data' => $storyID));
die(js::locate($this->createLink($this->app->rawModule, 'view', "storyID=$storyID"), 'parent'));
return print(js::locate($this->createLink($this->app->rawModule, 'view', "storyID=$storyID"), 'parent'));
}
$this->commonAction($storyID);
@@ -791,10 +791,11 @@ class story extends control
$this->action->logHistory($actionID, $changes);
}
}
die(js::locate($this->session->storyList, 'parent'));
return print(js::locate($this->session->storyList, 'parent'));
}
$storyIdList = $this->post->storyIdList ? $this->post->storyIdList : die(js::locate($this->session->storyList, 'parent'));
if(!$this->post->storyIdList) return print(js::locate($this->session->storyList, 'parent'));
$storyIdList = $this->post->storyIdList;
$storyIdList = array_unique($storyIdList);
/* Get edited stories. */
@@ -934,7 +935,7 @@ class story extends control
if(dao::isError())
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => dao::getError()));
die(js::error(dao::getError()));
return print(js::error(dao::getError()));
}
$story = $this->story->getByID($storyID);
$version = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch('version');
@@ -1011,7 +1012,7 @@ class story extends control
if(!empty($_POST))
{
$changes = $this->story->activate($storyID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($changes)
{
@@ -1065,7 +1066,7 @@ class story extends control
$storyID = (int)$storyID;
$story = $this->story->getById($storyID, $version, true);
if(!$story) die(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index')));
if(!$story) return print(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index')));
$story = $this->story->mergeReviewer($story, true);
@@ -1148,12 +1149,11 @@ class story extends control
public function delete($storyID, $confirm = 'no')
{
$story = $this->story->getById($storyID);
if($story->parent < 0) die(js::alert($this->lang->story->cannotDeleteParent));
if($story->parent < 0) return print(js::alert($this->lang->story->cannotDeleteParent));
if($confirm == 'no')
{
echo js::confirm($this->lang->story->confirmDelete, $this->createLink('story', 'delete', "story=$storyID&confirm=yes"), '');
exit;
return print(js::confirm($this->lang->story->confirmDelete, $this->createLink('story', 'delete', "story=$storyID&confirm=yes"), ''));
}
else
{
@@ -1169,7 +1169,7 @@ class story extends control
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
$locateLink = $this->session->storyList ? $this->session->storyList : $this->createLink('product', 'browse', "productID={$story->product}");
die(js::locate($locateLink, 'parent'));
return print(js::locate($locateLink, 'parent'));
}
}
@@ -1188,7 +1188,7 @@ class story extends control
if(!empty($_POST))
{
$changes = $this->story->review($storyID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($changes)
{
@@ -1199,10 +1199,10 @@ class story extends control
$this->executeHooks($storyID);
if(isonlybody()) die(js::reload('parent.parent'));
if(isonlybody()) return print(js::reload('parent.parent'));
$module = $from == 'project' ? 'projectstory' : 'story';
die(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
return print(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
}
/* Get story and product. */
@@ -1266,13 +1266,14 @@ class story extends control
*/
public function batchReview($result, $reason = '')
{
$storyIdList = $this->post->storyIdList ? $this->post->storyIdList : die(js::locate($this->session->storyList, 'parent'));
if(!$this->post->storyIdList) return print(js::locate($this->session->storyList, 'parent'));
$storyIdList = $this->post->storyIdList;
$storyIdList = array_unique($storyIdList);
$actions = $this->story->batchReview($storyIdList, $result, $reason);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
die(js::reload('parent'));
echo js::reload('parent');
}
/**
@@ -1289,7 +1290,7 @@ class story extends control
$this->loadModel('action')->create('story', $storyID, 'Recalled');
$locateLink = $this->session->storyList ? $this->session->storyList : $this->createLink('product', 'browse', "productID={$story->product}");
die(js::locate($locateLink, 'parent'));
echo js::locate($locateLink, 'parent');
}
/**
@@ -1393,10 +1394,11 @@ class story extends control
}
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
die(js::locate($this->session->storyList, 'parent'));
return print(js::locate($this->session->storyList, 'parent'));
}
$storyIdList = $this->post->storyIdList ? $this->post->storyIdList : die(js::locate($this->session->storyList, 'parent'));
if(!$this->post->storyIdList) return print(js::locate($this->session->storyList, 'parent'));
$storyIdList = $this->post->storyIdList;
$storyIdList = array_unique($storyIdList);
/* Get edited stories. */
@@ -1488,17 +1490,18 @@ class story extends control
*/
public function batchChangeModule($moduleID)
{
$storyIdList = !empty($_POST['storyIdList']) ? $this->post->storyIdList : die(js::locate($this->session->storyList, 'parent'));
if(empty($_POST['storyIdList'])) return print(js::locate($this->session->storyList, 'parent'));
$storyIdList = $this->post->storyIdList;
$storyIdList = array_unique($storyIdList);
$allChanges = $this->story->batchChangeModule($storyIdList, $moduleID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
foreach($allChanges as $storyID => $changes)
{
$actionID = $this->action->create('story', $storyID, 'Edited');
$this->action->logHistory($actionID, $changes);
}
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
die(js::locate($this->session->storyList, 'parent'));
echo js::locate($this->session->storyList, 'parent');
}
/**
@@ -1539,17 +1542,18 @@ class story extends control
*/
public function batchChangePlan($planID, $oldPlanID = 0)
{
$storyIdList = !empty($_POST['storyIdList']) ? $this->post->storyIdList : die(js::locate($this->session->storyList, 'parent'));
if(empty($_POST['storyIdList'])) return print(js::locate($this->session->storyList, 'parent'));
$storyIdList = $this->post->storyIdList;
$storyIdList = array_unique($storyIdList);
$allChanges = $this->story->batchChangePlan($storyIdList, $planID, $oldPlanID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
foreach($allChanges as $storyID => $changes)
{
$actionID = $this->action->create('story', $storyID, 'Edited');
$this->action->logHistory($actionID, $changes);
}
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
die(js::locate($this->session->storyList, 'parent'));
echo js::locate($this->session->storyList, 'parent');
}
/**
@@ -1563,8 +1567,8 @@ class story extends control
*/
public function batchChangeBranch($branchID, $confirm = '', $storyIdList = '')
{
if(!empty($_POST['storyIdList'])) $storyIdList = $_POST['storyIdList'];
$storyIdList = !empty($storyIdList) ? $storyIdList : die(js::locate($this->session->storyList, 'parent'));
if(empty($_POST['storyIdList'])) return print(js::locate($this->session->storyList, 'parent'));
$storyIdList = $this->post->storyIdList;
$plans = $this->loadModel('productplan')->getPlansByStories($storyIdList);
if(empty($confirm))
{
@@ -1598,21 +1602,21 @@ class story extends control
$storyIdList = implode(',', $storyIdList);
$confirmURL = $this->createLink('story', 'batchChangeBranch', "branchID=$branchID&confirm=yes&storyIdList=$storyIdList");
$cancelURL = $this->createLink('story', 'batchChangeBranch', "branchID=$branchID&confirm=no&storyIdList=$normalStotyIdList");
die(js::confirm(sprintf($this->lang->story->confirmChangeBranch, $conflictStoryIdList ), $confirmURL, $cancelURL));
return print(js::confirm(sprintf($this->lang->story->confirmChangeBranch, $conflictStoryIdList ), $confirmURL, $cancelURL));
}
}
if(is_string($storyIdList)) $storyIdList = array_filter(explode(',', $storyIdList));
$storyIdList = array_unique($storyIdList);
$allChanges = $this->story->batchChangeBranch($storyIdList, $branchID, $confirm, $plans);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
foreach($allChanges as $storyID => $changes)
{
$actionID = $this->action->create('story', $storyID, 'Edited');
$this->action->logHistory($actionID, $changes);
}
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
die(js::reload('parent'));
echo js::reload('parent');
}
/**
@@ -1625,11 +1629,11 @@ class story extends control
public function batchChangeStage($stage)
{
$storyIdList = $this->post->storyIdList;
if(empty($storyIdList)) die(js::locate($this->session->storyList, 'parent'));
if(empty($storyIdList)) return print(js::locate($this->session->storyList, 'parent'));
$storyIdList = array_unique($storyIdList);
$allChanges = $this->story->batchChangeStage($storyIdList, $stage);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
$action = $stage == 'verified' ? 'Verified' : 'Edited';
foreach($allChanges as $storyID => $changes)
@@ -1638,7 +1642,7 @@ class story extends control
$this->action->logHistory($actionID, $changes);
}
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
die(js::locate($this->session->storyList, 'parent'));
echo js::locate($this->session->storyList, 'parent');
}
/**
@@ -1653,7 +1657,7 @@ class story extends control
if(!empty($_POST))
{
$changes = $this->story->assign($storyID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
if($changes)
{
$actionID = $this->loadModel('action')->create('story', $storyID, 'Assigned', $this->post->comment, $this->post->assignedTo);
@@ -1706,7 +1710,7 @@ class story extends control
if(!empty($_POST) && isset($_POST['storyIdList']))
{
$allChanges = $this->story->batchAssignTo();
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
foreach($allChanges as $storyID => $changes)
{
$actionID = $this->action->create('story', $storyID, 'Assigned', '', $this->post->assignedTo);
@@ -1714,7 +1718,7 @@ class story extends control
}
}
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
die(js::locate($this->session->storyList, 'parent'));
echo js::locate($this->session->storyList, 'parent');
}
/**
@@ -1893,15 +1897,15 @@ class story extends control
if($type == 'remove')
{
$result = $this->story->unlinkStory($storyID, $linkedStoryID);
die(js::reload('parent'));
return print(js::reload('parent'));
}
if($_POST)
{
$this->story->linkStories($storyID);
if(dao::isError()) die(js::error(dao::getError()));
die(js::closeModal('parent.parent', 'this'));
if(dao::isError()) return print(js::error(dao::getError()));
return print(js::closeModal('parent.parent', 'this'));
}
/* Get story, product, products, and queryID. */
@@ -1953,7 +1957,7 @@ class story extends control
if($result == 'no')
{
$this->dao->update(TABLE_STORY)->set('URChanged')->eq(0)->where('id')->eq($storyID)->exec();
die(js::reload('parent', 'this'));
return print(js::reload('parent', 'this'));
}
$this->view->changedStories = $this->story->getChangedStories($story);
@@ -1983,16 +1987,16 @@ class story extends control
$stories = $this->story->getExecutionStoryPairs($executionID, $productID, $branch, $moduleID, $type);
if($this->app->getViewType() === 'json')
{
die(json_encode($stories));
return print(json_encode($stories));
}
elseif($this->app->getViewType() == 'mhtml')
{
die(html::select('story', empty($stories) ? array('' => '') : $stories, $storyID, 'onchange=setStoryRelated()'));
return print(html::select('story', empty($stories) ? array('' => '') : $stories, $storyID, 'onchange=setStoryRelated()'));
}
else
{
$storyName = $number === '' ? 'story' : "story[$number]";
die(html::select($storyName, empty($stories) ? array('' => '') : $stories, $storyID, 'class=form-control onchange=setStoryRelated(' . $number . ');'));
return print(html::select($storyName, empty($stories) ? array('' => '') : $stories, $storyID, 'class=form-control onchange=setStoryRelated(' . $number . ');'));
}
}
@@ -2044,8 +2048,8 @@ class story extends control
$select = html::select('story' . $number, empty($stories) ? array('' => '') : $stories, $storyID, "class='form-control'");
/* If only need options, remove select wrap. */
if($onlyOption == 'true') die(substr($select, strpos($select, '>') + 1, -10));
die($select);
if($onlyOption == 'true') return print(substr($select, strpos($select, '>') + 1, -10));
echo $select;
}
/**
@@ -2093,7 +2097,7 @@ class story extends control
$result['info'] = $this->lang->noResultsMatch;
}
die(json_encode($result));
echo json_encode($result);
}
/**
@@ -2476,8 +2480,8 @@ class story extends control
$user = $this->loadModel('user')->getById($userID, 'id');
$stories = $this->story->getUserStoryPairs($user->account);
if($id) die(html::select("stories[$id]", $stories, '', 'class="form-control"'));
die(html::select('story', $stories, '', 'class=form-control'));
if($id) return print(html::select("stories[$id]", $stories, '', 'class="form-control"'));
echo html::select('story', $stories, '', 'class=form-control');
}
/**
@@ -2513,6 +2517,6 @@ class story extends control
$status = $oldStory->status;
if($params['result'] == 'revert') $status = 'active';
}
die($status);
echo $status;
}
}
+1
View File
@@ -126,6 +126,7 @@ $lang->story->rejectedReason = 'Reject Reason';
$lang->story->reviewedBy = 'ReviewedBy';
$lang->story->reviewers = 'Reviewers';
$lang->story->reviewedDate = 'ReviewedDate';
$lang->story->activatedDate = 'Activated Date';
$lang->story->version = 'Version';
$lang->story->feedbackBy = 'From Name';
$lang->story->notifyEmail = 'From Email';
+1
View File
@@ -126,6 +126,7 @@ $lang->story->rejectedReason = '拒絶原因';
$lang->story->reviewedBy = '由誰評審';
$lang->story->reviewers = '評審人員';
$lang->story->reviewedDate = '評審時間';
$lang->story->activatedDate = '激活日期';
$lang->story->version = '版本號';
$lang->story->feedbackBy = '反饋者';
$lang->story->notifyEmail = '通知郵箱';
+11 -10
View File
@@ -477,6 +477,7 @@ class storyModel extends model
$story->sourceNote = $stories->sourceNote[$i];
$story->product = $productID;
$story->openedBy = $this->app->user->account;
$story->vision = $this->config->vision;
$story->openedDate = $now;
$story->version = 1;
@@ -487,7 +488,7 @@ class storyModel extends model
$story->{$extendField->field} = htmlSpecialString($story->{$extendField->field});
$message = $this->checkFlowRule($extendField, $story->{$extendField->field});
if($message) die(js::alert($message));
if($message) return print(js::alert($message));
}
foreach(explode(',', $this->config->story->create->requiredFields) as $field)
@@ -514,7 +515,7 @@ class storyModel extends model
if(dao::isError())
{
echo js::error(dao::getError());
die(js::reload('parent'));
return print(js::reload('parent'));
}
$storyID = $this->dao->lastInsertID();
@@ -1206,7 +1207,7 @@ class storyModel extends model
$story->{$extendField->field} = htmlSpecialString($story->{$extendField->field});
$message = $this->checkFlowRule($extendField, $story->{$extendField->field});
if($message) die(js::alert($message));
if($message) return print(js::alert($message));
}
$stories[$storyID] = $story;
@@ -1246,7 +1247,7 @@ class storyModel extends model
}
else
{
die(js::error('story#' . $storyID . dao::getError(true)));
return print(js::error('story#' . $storyID . dao::getError(true)));
}
}
}
@@ -1263,8 +1264,8 @@ class storyModel extends model
*/
public function review($storyID)
{
if($this->post->result == false) die(js::alert($this->lang->story->mustChooseResult));
if($this->post->result == 'revert' and $this->post->preVersion == false) die(js::alert($this->lang->story->mustChoosePreVersion));
if($this->post->result == false) return print(js::alert($this->lang->story->mustChooseResult));
if($this->post->result == 'revert' and $this->post->preVersion == false) return print(js::alert($this->lang->story->mustChoosePreVersion));
if(strpos($this->config->story->review->requiredFields, 'comment') !== false and !$this->post->comment)
{
@@ -1457,11 +1458,11 @@ class storyModel extends model
$this->dao->insert(TABLE_RELATION)->data($data)->autoCheck()->exec();
}
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) return print(js::error(dao::getError()));
$isonlybody = isonlybody();
unset($_GET['onlybody']);
die(js::locate(helper::createLink('product', 'browse', "productID=$oldStory->product&branch=0&browseType=unclosed&queryID=0&type=story"), $isonlybody ? 'parent.parent' : 'parent'));
return print(js::locate(helper::createLink('product', 'browse', "productID=$oldStory->product&branch=0&browseType=unclosed&queryID=0&type=story"), $isonlybody ? 'parent.parent' : 'parent'));
}
else
{
@@ -1591,7 +1592,7 @@ class storyModel extends model
}
else
{
die(js::error('story#' . $storyID . dao::getError(true)));
return print(js::error('story#' . $storyID . dao::getError(true)));
}
if(!dao::isError()) $this->loadModel('score')->create('story', 'close', $storyID);
}
@@ -3984,7 +3985,7 @@ class storyModel extends model
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from");
if($story->type != 'requirement' and $this->config->vision != 'lite') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'");
if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite') common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite') common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id&executionID={$this->session->project}", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
}
else
+1 -1
View File
@@ -50,7 +50,7 @@ foreach(explode(',', $showFields) as $field)
<th class='c-title required'><?php echo $lang->story->title;?></th>
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden')?>'> <?php echo $lang->story->estimateAB;?></th>
<th class='c-category'><?php echo $lang->story->category;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->priAB;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden')?>' title=<?php echo $lang->story->pri;?>> <?php echo $lang->priAB;?></th>
<th class='c-user<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'> <?php echo $lang->story->assignedTo;?></th>
<th class='c-source<?php echo zget($visibleFields, 'source', ' hidden')?>'> <?php echo $lang->story->source;?></th>
<th class='c-note<?php echo zget($visibleFields, 'source', ' hidden')?>'> <?php echo $lang->story->sourceNote;?></th>
+1 -1
View File
@@ -12,7 +12,7 @@
<tr class='text-center'>
<th class='c-id'> <?php echo $lang->idAB;?></th>
<th class='w-p30'> <?php echo $lang->bug->title;?></th>
<th class='c-pri'> <?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->story->pri;?>><?php echo $lang->priAB;?></th>
<th class='c-type'> <?php echo $lang->bug->type;?></th>
<th class='c-status'> <?php echo $lang->statusAB;?></th>
<th class='c-user'> <?php echo $lang->bug->assignedTo;?></th>
+1 -1
View File
@@ -12,7 +12,7 @@
<tr class='text-center'>
<th class='c-id'> <?php echo $lang->idAB;?></th>
<th class='w-p30'> <?php echo $lang->testcase->title;?></th>
<th class='c-pri'> <?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->story->pri;?>><?php echo $lang->priAB;?></th>
<th class='c-type'> <?php echo $lang->testcase->type;?></th>
<th class='c-status'><?php echo $lang->statusAB;?></th>
<th class='c-user'> <?php echo $lang->testcase->lastRunner;?></th>
+1 -1
View File
@@ -35,7 +35,7 @@
</div>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->story->pri;?>><?php echo $lang->priAB;?></th>
<th><?php echo $lang->story->title;?></th>
<th class='c-status'><?php echo $lang->story->status;?></th>
<?php if($story->type == 'requirement'):?>
+1 -1
View File
@@ -15,7 +15,7 @@ include '../../common/view/chart.html.php';
<tr class='text-center'>
<th class='c-id'> <?php echo $lang->idAB;?></th>
<th class='w-p30'> <?php echo $lang->task->name;?></th>
<th class='c-pri'> <?php echo $lang->priAB;?></th>
<th class='c-pri' title=<?php echo $lang->story->pri;?>><?php echo $lang->priAB;?></th>
<th class='c-status'> <?php echo $lang->statusAB;?></th>
<th class='c-user'> <?php echo $lang->task->assignedToAB;?></th>
<th class='c-estimate'><?php echo $lang->task->estimateAB;?></th>

Some files were not shown because too many files have changed in this diff Show More