Merge branch 'sprint/272_tianshujie' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/272_tianshujie

This commit is contained in:
caoyanyi
2022-12-14 10:43:18 +08:00
65 changed files with 456 additions and 222 deletions
+1
View File
@@ -108,6 +108,7 @@ zentaoxx:
sed -i "s/\$$super = \$$this->dao->select('admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('admin');/\$$account = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('account');\n\$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$adminArray = explode(',', \$$admins);\n\$$super = in_array(\$$account, \$$adminArray) ? 'super' : '';/g" zentaoxx/extension/xuan/im/control.php
sed -i "/foreach(\$$users as \$$user)/i \$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\$$adminArray = explode(',', \$$admins);" zentaoxx/extension/xuan/im/model/user.php
sed -i "/if(\!isset(\$$user->signed)) \$$user->signed = 0;/a \$$user->admin = in_array(\$$user->account, \$$adminArray) ? 'super' : '';" zentaoxx/extension/xuan/im/model/user.php
sed -i "/updateUser->ping/d" zentaoxx/extension/xuan/im/model/user.php
sed -i "s/\$$user = \$$this->user->login(\$$account, \$$user->password);/\$$user = \$$this->user->login(\$$user);\n\$$url .= \$$this->config->requestType == 'GET' ? '\&' : '?';\n\$$url .= \"{\$$this->config->sessionVar}={\$$this->app->sessionID}\";\n/" zentaoxx/extension/xuan/im/control.php
sed -i "s/\$$file->fullURL/\$$file->webPath/" zentaoxx/extension/xuan/im/control.php
sed -i 's/XXBVERSION/$(XVERSION)/g' zentaoxx/config/ext/_0_xuanxuan.php
+2
View File
@@ -2,3 +2,5 @@ ALTER TABLE `zt_story` ADD COLUMN `twins` varchar(255) NOT NULL AFTER `linkRequi
ALTER TABLE `zt_productplan` MODIFY COLUMN `branch` varchar(255) NOT NULL DEFAULT '0';
ALTER TABLE `zt_effort` ADD `extra` text COLLATE 'utf8_general_ci' NOT NULL AFTER `end`;
ALTER TABLE `zt_build` MODIFY COLUMN `branch` varchar(255) NOT NULL DEFAULT '0';
ALTER TABLE `zt_feedback` ADD COLUMN `activatedBy` varchar(30) NOT NULL AFTER `assignedDate`;
ALTER TABLE `zt_feedback` ADD COLUMN `activatedDate` datetime NOT NULL AFTER `activatedBy`;
+2 -2
View File
@@ -1801,7 +1801,7 @@ class bug extends control
}
else
{
return print(js::closeModal('parent.parent'));
return print(js::closeModal('parent.parent', 'this', "typeof(parent.parent.setTitleWidth) == 'function' ? parent.parent.setTitleWidth() : parent.parent.location.reload()"));
}
}
if(defined('RUN_MODE') && RUN_MODE == 'api')
@@ -1988,7 +1988,7 @@ class bug extends control
}
else
{
return print(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
return print(js::closeModal('parent.parent', 'this', "typeof(parent.parent.setTitleWidth) == 'function' ? parent.parent.setTitleWidth() : parent.parent.location.reload()"));
}
}
if(defined('RUN_MODE') && RUN_MODE == 'api')
+1 -1
View File
@@ -1,6 +1,6 @@
$(function()
{
if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150);
setTitleWidth();
/* The display of the adjusting sidebarHeader is synchronized with the sidebar. */
$(".sidebar-toggle").click(function()
+17
View File
@@ -985,3 +985,20 @@ function setBranchRelated(branchID, productID, num)
$.ajaxSettings.async = true;
}
}
/**
* Set title field width.
*
* @access public
* @return void
*/
function setTitleWidth()
{
if(window.config.currentMethod != 'browse') return false;
if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150);
setTimeout(function()
{
if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150);
}, 400)
}
+16
View File
@@ -7,3 +7,19 @@
.body-modal #mainContent {min-height: 200px;}
td.article-content{overflow:auto !important;}
td.c-build{white-space: nowrap; overflow:hidden;}
#stories th, #stories td{padding-left:16px;}
#stories .c-estimate{width:90px; text-align:right}
#stories .c-status{width:120px}
#stories .c-stage{width:130px; text-align:left;}
#bugs .c-status{width:100px;}
#bugs .c-build{width:160px; text-align:left}
#bugs .c-user{width:120px;}
#bugs .c-date{width:130px;}
#bugs .c-actions-1{width:60px;}
#generatedBugs .c-id {width:60px;}
#generatedBugs .c-severity {width:70px;}
#generatedBugs .c-status {width:100px;}
#generatedBugs .c-build {width:160px; text-align:left}
#generatedBugs .c-user {width:100px;}
#generatedBugs .c-date {width:120px;}
+30 -32
View File
@@ -88,15 +88,15 @@ tbody tr td:first-child input {display: none;}
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</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-pri' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<?php if($childBuilds):?>
<th class='c-build w-200px text-left'><?php echo $lang->build->linkedBuild;?></th>
<?php endif;?>
<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>
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-status'><?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-estimate'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='c-stage'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-actions-1'><?php echo $lang->actions?></th>
</tr>
</thead>
@@ -125,11 +125,6 @@ tbody tr td:first-child input {display: none;}
<?php printf('%03d', $story->id);?>
<?php endif;?>
</td>
<td>
<?php if($story->pri):?>
<span class='label-pri label-pri-<?php echo $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span>
<?php endif;?>
</td>
<td class='text-left nobr' title='<?php echo $story->title?>'>
<?php
if($story->parent > 0) echo "<span class='label label-badge label-light'>{$lang->story->childrenAB}</span>";
@@ -147,17 +142,20 @@ tbody tr td:first-child input {display: none;}
}
?>
</td>
<td>
<?php if($story->pri):?>
<span class='label-pri label-pri-<?php echo $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span>
<?php endif;?>
</td>
<td>
<span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span>
</td>
<?php if($childBuilds):?>
<td class='c-build text-left' title='<?php echo $buildName?>'><?php echo $buildName;?></td>
<?php endif;?>
<td><?php echo zget($users, $story->openedBy);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status;?>'>
<?php echo $this->processStatus('story', $story);?>
</span>
</td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-estimate' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td class='c-stage'><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-actions'>
<?php
if($canBeChanged and common::hasPriv($module, 'unlinkStory'))
@@ -208,14 +206,14 @@ tbody tr td:first-child input {display: none;}
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='text-left'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<?php if($childBuilds):?>
<th class='c-build w-200px text-left'><?php echo $lang->build->linkedBuild?></th>
<th class='c-build'><?php echo $lang->build->linkedBuild?></th>
<?php endif;?>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
<th class='c-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<th class='c-actions-1'><?php echo $lang->actions?></th>
</tr>
@@ -254,7 +252,7 @@ tbody tr td:first-child input {display: none;}
</span>
</td>
<?php if($childBuilds):?>
<td class='c-build text-left' title='<?php echo $buildName?>'><?php echo $buildName;?></td>
<td class='c-build' title='<?php echo $buildName?>'><?php echo $buildName;?></td>
<?php endif;?>
<td><?php echo zget($users, $bug->openedBy);?></td>
<td><?php echo helper::isZeroDate($bug->openedDate) ? '' : substr($bug->openedDate, 5, 11);?></td>
@@ -297,14 +295,14 @@ tbody tr td:first-child input {display: none;}
<?php $vars = "buildID={$build->id}&type=generatedBug&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr class='text-center'>
<th class='c-id text-left'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='c-status' title=<?php echo $lang->bug->severity;?>><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='c-build w-200px text-left'><?php echo $lang->bug->openedBuild;?></th>
<th class='c-id text-left'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-severity' title=<?php echo $lang->bug->severity;?>><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='c-build'> <?php echo $lang->bug->openedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
<th class='c-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
</tr>
</thead>
@@ -324,6 +322,9 @@ tbody tr td:first-child input {display: none;}
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
<tr>
<td class='text-left'><?php printf('%03d', $bug->id);?></td>
<td class='text-left nobr' title='<?php echo $bug->title?>'>
<?php echo html::a($bugLink, $bug->title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");?>
</td>
<td class='c-severity'>
<?php if($hasCustomSeverity):?>
<span class='label-severity-custom' data-severity='<?php echo $bug->severity;?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span>
@@ -331,9 +332,6 @@ tbody tr td:first-child input {display: none;}
<span class='label-severity' data-severity='<?php echo $bug->severity;?>' title='<?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?>'></span>
<?php endif;?>
</td>
<td class='text-left nobr' title='<?php echo $bug->title?>'>
<?php echo html::a($bugLink, $bug->title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");?>
</td>
<td>
<span class='status-bug status-<?php echo $bug->status?>'>
<?php echo $this->processStatus('bug', $bug);?>
@@ -343,7 +341,7 @@ tbody tr td:first-child input {display: none;}
$openedBuilds = '';
foreach(explode(',', $bug->openedBuild) as $buildID) $openedBuilds .= ($buildID == 'trunk' ? 'Trunk' : zget($buildPairs, $buildID, '')) . ' ';
?>
<td class='c-build text-left' title='<?php echo $openedBuilds;?>'><?php echo $openedBuilds;?></td>
<td class='c-build' title='<?php echo $openedBuilds;?>'><?php echo $openedBuilds;?></td>
<td><?php echo zget($users, $bug->openedBy);?></td>
<td><?php echo helper::isZeroDate($bug->openedDate) ? '' : substr($bug->openedDate, 5, 11);?></td>
<td><?php echo zget($users, $bug->resolvedBy);?></td>
+2 -2
View File
@@ -371,10 +371,10 @@ class deptModel extends model
/**
* Get users of a deparment.
*
* @param varchar $browseType inside|outside|all
* @param string $browseType inside|outside|all
* @param int $deptID
* @param object $pager
* @param varchar $orderBy
* @param string $orderBy
* @access public
* @return array
*/
+12
View File
@@ -934,6 +934,17 @@ class execution extends control
$moduleTree = $this->tree->getProjectStoryTreeMenu($executionID, 0, array('treeModel', $createModuleLink));
}
$executionProductList = $this->loadModel('product')->getProducts($executionID);
$multiBranch = false;
foreach($executionProductList as $executionProduct)
{
if($executionProduct->type != 'normal')
{
$multiBranch = true;
break;
}
}
/* Assign. */
$this->view->title = $title;
$this->view->position = $position;
@@ -963,6 +974,7 @@ class execution extends control
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->view->showBranch = $showBranch;
$this->view->storyStages = $this->product->batchGetStoryStage($stories);
$this->view->multiBranch = $multiBranch;
$this->display();
}
+1
View File
@@ -34,3 +34,4 @@ th.c-pri{width:50px;}
.table td.c-estimate {padding-right: 12px;}
.main-table tbody > tr.table-children > td:first-child::before {width: 3px;}
.table-footer {z-index: 1;}
#linkStoryByPlan .modal-header {padding: 20px 0 10px 0; border-bottom: 0px}
+3
View File
@@ -597,3 +597,6 @@ $lang->execution->gantt->exporting = 'Exporting...';
$lang->execution->gantt->exportFail = 'Failed to export.';
$lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761');
$lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported.";
$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated.";
+3
View File
@@ -597,3 +597,6 @@ $lang->execution->gantt->exporting = 'Exporting...';
$lang->execution->gantt->exportFail = 'Failed to export.';
$lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761');
$lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported.";
$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated.";
+3
View File
@@ -597,3 +597,6 @@ $lang->execution->gantt->exporting = 'Exporting...';
$lang->execution->gantt->exportFail = 'Failed to export.';
$lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761');
$lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported.";
$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated.";
+3
View File
@@ -597,3 +597,6 @@ $lang->execution->gantt->exporting = '正在导出……';
$lang->execution->gantt->exportFail = '导出失败。';
$lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761');
$lang->execution->linkBranchStoryByPlanTips = "执行按计划关联需求时,只导入本执行所关联%s的激活状态的需求。";
$lang->execution->linkNormalStoryByPlanTips = "执行按计划关联需求时,只导入激活状态的需求。";
+4 -1
View File
@@ -402,7 +402,10 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<?php $linkStoryByPlanTips = $execution->multiple ? $lang->execution->linkStoryByPlanTips : str_replace($lang->executionCommon, $lang->projectCommon, $lang->execution->linkStoryByPlanTips);?>
<?php
$linkStoryByPlanTips = $multiBranch ? sprintf($lang->execution->linkBranchStoryByPlanTips, $lang->project->branch) : $lang->execution->linkNormalStoryByPlanTips;
$linkStoryByPlanTips = $execution->multiple ? $linkStoryByPlanTips : str_replace($lang->executionCommon, $lang->projectCommon, $linkStoryByPlanTips);
?>
<h4 class="modal-title"><?php echo $lang->execution->linkStoryByPlan;?></h4><?php echo '(' . $linkStoryByPlanTips . ')';?>
</div>
<div class="modal-body">
+1 -1
View File
@@ -546,7 +546,7 @@ $lang->resource->story->batchChangeModule = 'batchChangeModule';
$lang->resource->story->batchToTask = 'batchToTask';
$lang->resource->story->processStoryChange = 'processStoryChange';
$lang->resource->story->linkStories = 'linkStoriesAB';
$lang->resource->story->relieved = 'relievedSiblings';
$lang->resource->story->relieved = 'relievedTwins';
$lang->story->methodOrder[5] = 'create';
$lang->story->methodOrder[10] = 'batchCreate';
+2 -2
View File
@@ -250,8 +250,8 @@ class holidayModel extends model
/**
* Get diff days.
*
* @param varchar $begin
* @param varchar $end
* @param string $begin
* @param string $end
* @access public
* @return bool
*/
+1 -1
View File
@@ -249,7 +249,7 @@ class product extends control
$showBranch = $this->loadModel('branch')->showBranch($productID);
/* Get stories. */
if($isProjectStory)
if($isProjectStory and $storyType == 'story')
{
$showBranch = $this->loadModel('branch')->showBranch($productID, 0, $projectID);
+1
View File
@@ -41,3 +41,4 @@ a.removeModule:hover {color: red;}
#productStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;}
.c-span {margin-left: 19px;}
.btn-toolbar #query span.text{overflow: hidden; width: 52px; vertical-align: middle; margin-right: 1px;}
#linkStoryByPlan .modal-header {padding: 20px 0 10px 0; border-bottom: 0px}
+5 -1
View File
@@ -620,7 +620,11 @@ js::set('vision', $this->config->vision);
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php echo $lang->execution->linkStoryByPlan;?></h4><?php echo '(' . $lang->project->linkStoryByPlanTips . ')';?>
<h4 class="modal-title">
<?php
$linkStoryByPlanTips = $product->type == 'normal' ? $lang->project->linkNormalStoryByPlanTips : sprintf($lang->project->linkBranchStoryByPlanTips, $lang->product->branchName[$product->type]);
echo $lang->execution->linkStoryByPlan;?></h4><?php echo '(' . $linkStoryByPlanTips . ')';
?>
</div>
<div class="modal-body">
<div class='input-group'>
+3
View File
@@ -33,3 +33,6 @@ ol, ul {padding-left: 20px;}
#mainMenu .btn-toolbar .page-title .text {max-width: 434px; overflow: hidden; white-space:nowrap; margin-right: 6px;}
#actionsBox a:last-of-type + .divider {display: none;}
#actionsBox div.divider:first-child {display: none;}
#bugs th.c-pri, #bugs th.c-actions {width:70px !important;}
#bugs th.c-status, #bugs th.c-user {width:120px !important;}
+1 -1
View File
@@ -97,7 +97,7 @@ $('#submit').click(function()
{
var parentPlan = $('#parent').val();
var branches = $('#branch').val();
if(parentPlan != 0 && branches)
if(parentPlan > 0 && branches)
{
link = createLink('productplan', 'ajaxGetDiffBranchesTip', "produtID=" + productID + "&parentID=" + parentPlan + "&branches=" + branches.toString());
$.post(link, function(diffBranchesTip)
+1 -1
View File
@@ -88,7 +88,7 @@ $('#submit').click(function()
{
var parentPlan = $('#parent').val();
var branches = $('#branch').val();
if(parentPlan != 0 && branches)
if(parentPlan > 0 && branches)
{
link = createLink('productplan', 'ajaxGetDiffBranchesTip', "produtID=" + productID + "&parentID=" + parentPlan + "&branches=" + branches.toString());
$.post(link, function(diffBranchesTip)
+1
View File
@@ -139,6 +139,7 @@ $lang->productplan->endLetterChildTip = "The completion date of the parent pl
$lang->productplan->beginLetterParentTip = "The start date of the child plan[%s]: %s, cannot be less than the start date of the parent plan: %s.";
$lang->productplan->endGreaterParentTip = "The completion date of the child plan[%s]: %s, cannot be greater than the completion date of the parent plan: %s.";
$lang->productplan->diffBranchesTip = "The @branch@『%s』 of parent plan is not linked with the child plan. @branch@'s stories and bugs whill be removed from the plan. Do you want to save?";
$lang->productplan->deleteBranchTip = "@branch@『%s』are linked with sub plans and cannot be modified.";
$lang->productplan->featureBar['browse']['all'] = 'Alle';
$lang->productplan->featureBar['browse']['undone'] = 'Undone';
+1
View File
@@ -139,6 +139,7 @@ $lang->productplan->endLetterChildTip = "The completion date of the parent pl
$lang->productplan->beginLetterParentTip = "The start date of the child plan[%s]: %s, cannot be less than the start date of the parent plan: %s.";
$lang->productplan->endGreaterParentTip = "The completion date of the child plan[%s]: %s, cannot be greater than the completion date of the parent plan: %s.";
$lang->productplan->diffBranchesTip = "The @branch@『%s』of parent plan is not linked with the child plan. @branch@'s stories and bugs whill be removed from the plan. Do you want to save?";
$lang->productplan->deleteBranchTip = "@branch@『%s』are linked with sub plans and cannot be modified.";
$lang->productplan->featureBar['browse']['all'] = 'All';
$lang->productplan->featureBar['browse']['undone'] = 'Undone';
+1
View File
@@ -139,6 +139,7 @@ $lang->productplan->endLetterChildTip = "The completion date of the parent pl
$lang->productplan->beginLetterParentTip = "The start date of the child plan[%s]: %s, cannot be less than the start date of the parent plan: %s.";
$lang->productplan->endGreaterParentTip = "The completion date of the child plan[%s]: %s, cannot be greater than the completion date of the parent plan: %s.";
$lang->productplan->diffBranchesTip = "The @branch@『%s』of parent plan is not linked with the child plan. @branch@'s stories and bugs whill be removed from the plan. Do you want to save?";
$lang->productplan->deleteBranchTip = "@branch@『%s』are linked with sub plans and cannot be modified.";
$lang->productplan->featureBar['browse']['all'] = 'Tous';
$lang->productplan->featureBar['browse']['undone'] = 'Undone';
+1
View File
@@ -139,6 +139,7 @@ $lang->productplan->endLetterChildTip = "父计划[%s]的完成日期:%s,
$lang->productplan->beginLetterParentTip = "子计划[%s]的开始日期:%s,不能小于父计划的开始日期: %s";
$lang->productplan->endGreaterParentTip = "子计划[%s]的完成日期:%s,不能大于父计划的完成日期: %s";
$lang->productplan->diffBranchesTip = "父计划的@branch@『%s』未被子计划关联,对应@branch@的需求和bug将自动从计划中移除,是否保存?";
$lang->productplan->deleteBranchTip = "@branch@『%s』被子计划关联,无法修改。";
$lang->productplan->featureBar['browse']['all'] = '全部';
$lang->productplan->featureBar['browse']['undone'] = '未完成';
+35 -3
View File
@@ -595,10 +595,42 @@ class productplanModel extends model
->get();
$product = $this->loadModel('product')->getByID($oldPlan->product);
if($product->type != 'normal' and $oldPlan->parent != -1 and !isset($_POST['branch']))
if($product->type != 'normal')
{
$this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]);
dao::$errors['branch'] = sprintf($this->lang->error->notempty, $this->lang->product->branch);
if(!isset($_POST['branch']))
{
$this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]);
dao::$errors['branch'] = sprintf($this->lang->error->notempty, $this->lang->product->branch);
}
else
{
if($oldPlan->parent == -1)
{
/* Get branches of child plans. */
$childBranches = array();
$childPlans = $this->getChildren($oldPlan->id);
$branchPairs = $this->loadModel('branch')->getPairs($oldPlan->product);
foreach($childPlans as $children)
{
foreach(explode(',', $children->branch) as $childBranchID) $childBranches[$childBranchID] = $childBranchID;
}
/* Get branches of parent plan that cannot delete. */
$canDeleteBranch = true;
$deleteBranches = '';
foreach(explode(',', $oldPlan->branch) as $oldBranchID)
{
if(strpos(",$plan->branch,", ",$oldBranchID,") === false and isset($childBranches[$oldBranchID]))
{
$canDeleteBranch = false;
if(isset($branchPairs[$oldBranchID])) $deleteBranches .= "{$branchPairs[$oldBranchID]},";
}
}
$this->lang->productplan->deleteBranchTip = str_replace('@branch@', $this->lang->product->branchName[$product->type], $this->lang->productplan->deleteBranchTip);
if(!$canDeleteBranch) dao::$errors[] = sprintf($this->lang->productplan->deleteBranchTip, trim($deleteBranches, ','));
}
}
}
$parentPlan = $this->getByID($plan->parent);
+1 -1
View File
@@ -40,7 +40,7 @@
<td><?php echo html::select('parent', array(0 => '') + $parentPlanPairs, $plan->parent, "class='form-control chosen'");?>
</tr>
<?php endif;?>
<?php if(!$product->shadow and $product->type != 'normal' and $plan->parent != '-1'):?>
<?php if(!$product->shadow and $product->type != 'normal'):?>
<tr>
<th><?php echo $lang->product->branch;?></th>
<td class='required'><?php echo html::select('branch[]', $branchTagOption, $plan->branch, "class='form-control chosen' multiple");?></td><td></td><td></td>
+27 -33
View File
@@ -124,8 +124,8 @@
<th class='c-id text-left'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</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' title='<?php echo $lang->pri;?>'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<?php else:?>
<th class='c-id text-left'>
@@ -139,15 +139,15 @@
<?php if($canOrder):?>
<th class='w-70px'><?php common::printOrderLink('order', $orderBy, $vars, $lang->productplan->updateOrder);?></th>
<?php endif;?>
<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>
<th class='c-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-70px text-right'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='w-70px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-actions-1'> <?php echo $lang->actions?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='w-150px text-left'><?php common::printOrderLink('module', $orderBy, $vars, $lang->story->module);?></th>
<th class='w-70px' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-70px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></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>
<th class='w-70px text-right'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='w-80px'><?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-actions-1'><?php echo $lang->actions?></th>
<?php endif;?>
</tr>
</thead>
@@ -165,13 +165,13 @@
<td class='c-id text-left'>
<?php printf('%03d', $story->id);?>
</td>
<td><span class="<?php echo $story->pri ? 'label-pri label-pri-' . $story->pri : "";?>" title='<?php echo zget($lang->story->priList, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri);?></span></td>
<td class='text-left nobr' title='<?php echo $story->title?>'>
<?php
if($story->parent > 0) echo "<span class='label label-badge label-light' title={$lang->story->children}>{$lang->story->childrenAB}</span>";
echo $story->title;
?>
</td>
<td><span class="<?php echo $story->pri ? 'label-pri label-pri-' . $story->pri : "";?>" title='<?php echo zget($lang->story->priList, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri);?></span></td>
<td>
<span class='status-story status-<?php echo $story->status?>'>
<?php echo $this->processStatus('story', $story);?>
@@ -186,22 +186,20 @@
<?php endif;?>
</td>
<?php if($canOrder):?><td class='sort-handler'><i class='icon-move'></i></td><?php endif;?>
<td><span class="<?php echo $story->pri ? 'label-pri label-pri-' . $story->pri : "";?>" title='<?php echo zget($lang->story->priList, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri);?></span></td>
<td class='text-left nobr' title='<?php echo zget($modulePairs, $story->module, '');?>'><?php echo zget($modulePairs, $story->module, '');?></td>
<td class='text-left nobr' title='<?php echo $story->title?>'>
<?php
if($story->parent > 0) echo "<span class='label label-badge label-light' title={$lang->story->children}>{$lang->story->childrenAB}</span>";
echo html::a($viewLink , $story->title, '', "style='color: $story->color' data-app={$this->app->tab}");
?>
</td>
<td class='text-left nobr' title='<?php echo zget($modulePairs, $story->module, '');?>'><?php echo zget($modulePairs, $story->module, '');?></td>
<td><span class="<?php echo $story->pri ? 'label-pri label-pri-' . $story->pri : "";?>" title='<?php echo zget($lang->story->priList, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri);?></span></td>
<td>
<span class='status-story status-<?php echo $story->status?>'><?php echo $this->processStatus('story', $story);?></span>
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo zget($users, $story->assignedTo);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status?>'>
<?php echo $this->processStatus('story', $story);?>
</span>
</td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-actions'>
<?php
@@ -419,8 +417,8 @@
<th class='c-id text-left'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</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-70px' title='<?php echo $lang->pri;?>'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<?php else:?>
<th class='c-id text-left'>
@@ -431,12 +429,12 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</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='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></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>
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='w-50px'> <?php echo $lang->actions?></th>
<th class='c-actions'> <?php echo $lang->actions?></th>
<?php endif;?>
</tr>
</thead>
@@ -447,12 +445,10 @@
<td class='c-id text-left'>
<?php printf('%03d', $bug->id);?>
</td>
<td><span class='<?php echo $bug->pri ? "label-pri label-pri-{$bug->pri}" : "";?>' title='<?php echo zget($lang->bug->priList, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri);?></span></td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo $bug->title?></td>
<td><span class='<?php echo $bug->pri ? "label-pri label-pri-{$bug->pri}" : "";?>' title='<?php echo zget($lang->bug->priList, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri);?></span></td>
<td>
<span class='status-bug status-<?php echo $bug->status?>'>
<?php echo $this->processStatus('bug', $bug);?>
</span>
<span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
</td>
<?php else:?>
<td class='c-id text-left'>
@@ -462,15 +458,13 @@
<?php printf('%03d', $bug->id);?>
<?php endif;?>
</td>
<td><span class='<?php echo $bug->pri ? "label-pri label-pri-{$bug->pri}" : "";?>' title='<?php echo zget($lang->bug->priList, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri);?></span></td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', "data-app={$this->app->tab}");?></td>
<td><span class='<?php echo $bug->pri ? "label-pri label-pri-{$bug->pri}" : "";?>' title='<?php echo zget($lang->bug->priList, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri);?></span></td>
<td>
<span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
</td>
<td><?php echo zget($users, $bug->openedBy);?></td>
<td><?php echo zget($users, $bug->assignedTo);?></td>
<td>
<span class='status-bug status-<?php echo $bug->status?>'>
<?php echo $this->processStatus('bug', $bug);?>
</span>
</td>
<td class='c-actions'>
<?php
if($canBeChanged and common::hasPriv('productplan', 'unlinkBug'))
+2 -2
View File
@@ -29,8 +29,8 @@ class program extends control
/**
* Program list.
*
* @param varchar $status
* @param varchar $orderBy
* @param string $status
* @param string $orderBy
* @access public
* @return void
*/
+3
View File
@@ -382,3 +382,6 @@ $lang->project->copyProject->nameTips = '『Project Name』Cannot be r
$lang->project->copyProject->codeTips = '『Project Code』Cannot be repeated.';
$lang->project->copyProject->endTips = '『Schedule End』Cannot be empty.';
$lang->project->copyProject->daysTips = '『Available working days』Should be numerical.';
$lang->project->linkBranchStoryByPlanTips = "When the project is scheduled to associate requirements, only the activated requirements associated with the %s of the project are imported.";
$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported.";
+3
View File
@@ -382,3 +382,6 @@ $lang->project->copyProject->nameTips = '『Project Name』Cannot be r
$lang->project->copyProject->codeTips = '『Project Code』Cannot be repeated.';
$lang->project->copyProject->endTips = '『Schedule End』Cannot be empty.';
$lang->project->copyProject->daysTips = '『Available working days』Should be numerical.';
$lang->project->linkBranchStoryByPlanTips = "When the project is scheduled to associate requirements, only the activated requirements associated with the %s of the project are imported.";
$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported.";
+3
View File
@@ -382,3 +382,6 @@ $lang->project->copyProject->nameTips = '『Project Name』Cannot be r
$lang->project->copyProject->codeTips = '『Project Code』Cannot be repeated.';
$lang->project->copyProject->endTips = '『Schedule End』Cannot be empty.';
$lang->project->copyProject->daysTips = '『Available working days』Should be numerical.';
$lang->project->linkBranchStoryByPlanTips = "When the project is scheduled to associate requirements, only the activated requirements associated with the %s of the project are imported.";
$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported.";
+3
View File
@@ -382,3 +382,6 @@ $lang->project->copyProject->nameTips = '『项目名称』不可重
$lang->project->copyProject->codeTips = '『项目代号』不可重复需要修改。';
$lang->project->copyProject->endTips = '『计划完成』不能为空。';
$lang->project->copyProject->daysTips = '『可用工作日』应当是数字。';
$lang->project->linkBranchStoryByPlanTips = "项目按计划关联需求时,只导入本项目所关联%s的激活状态的需求。";
$lang->project->linkNormalStoryByPlanTips = "项目按计划关联需求时,只导入激活状态的需求。";
+6 -4
View File
@@ -2,7 +2,9 @@
#releaseList tr:hover {background-color:unset;}
td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.c-build {width: 300px;}
.c-branch {width: 200px;}
td.c-build {padding-left:8px !important;}
.c-product, .c-execution {width: 120px;}
#releaseList .c-id{width:60px;}
#releaseList .c-build,#releaseList .c-product{width:180px;}
#releaseList .c-branch {width: 120px;}
#releaseList .c-date {width: 120px;}
#releaseList td.c-build {padding-left:8px !important;}
#releaseList .c-execution {width: 120px;}
+12
View File
@@ -10,3 +10,15 @@
ol, ul {padding-left: 20px;}
.c-id {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
td.c-build{white-space: nowrap; overflow:hidden;}
#stories th, #stories td{padding-left:16px;}
#stories .c-build{width:160px; text-align:left;}
#stories .c-status{width:120px;}
#stories .c-stage{width:130px; text-align:left;}
#stories .c-estimate{width:90px; text-align:right;}
#bugs .c-build{width:160px; text-align:left;}
#bugs .c-user{width:120px;}
#bugs .c-date{width:130px;}
#leftBugs .c-build{width:160px; text-align:left;}
#leftBugs .c-user{width:120px;}
#leftBugs .c-date{width:160px;}
+27 -27
View File
@@ -60,7 +60,7 @@
?>
<?php $vars = "releaseID={$release->id}&type=story&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
@@ -69,17 +69,17 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class="text-left"><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></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-build w-200px text-left'><?php echo $lang->build->linkedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px text-right' style='padding-right:20px'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='w-90px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-100px'><?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-build'> <?php echo $lang->build->linkedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-estimate'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='c-stage'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-actions-1'><?php echo $lang->actions?></th>
</tr>
</thead>
<tbody>
<tbody class='text-center'>
<?php foreach($stories as $storyID => $story):?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=0&param={$this->session->project}", '', true);?>
<tr>
@@ -92,20 +92,20 @@
<?php endif;?>
<?php echo sprintf('%03d', $story->id);?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td class='text-left nobr' title='<?php echo $story->title?>'>
<?php
if($story->parent > 0) echo "<span class='label label-badge label-light'>{$lang->story->childrenAB}</span>";
echo html::a($storyLink,$story->title, '', "class='preview'");
?>
</td>
<td class='c-build text-left' title='<?php echo $story->buildName?>'><?php echo $story->buildName?></td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td class='text-right' style='padding-right:25px' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td>
<span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span>
</td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-build text-left' title='<?php echo $story->buildName?>'><?php echo $story->buildName?></td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td class='c-estimate' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td class='c-stage'><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('projectrelease', 'unlinkStory') and $canBeChanged)
@@ -167,14 +167,14 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</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>
<th class='c-build w-200px text-left'><?php echo $lang->bug->resolvedBuild;?></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>
<th class='c-build'> <?php echo $lang->bug->resolvedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-100px'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<th class='w-50px'> <?php echo $lang->actions;?></th>
<th class='c-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
<th class='c-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<th class='w-60px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class='text-center'>
@@ -259,13 +259,13 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-80px' title=<?php echo $lang->bug->severity;?>><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></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>
<th class='c-build w-200px text-left'><?php echo $lang->bug->openedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-150px'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='w-50px'> <?php echo $lang->actions;?></th>
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='c-build'><?php echo $lang->bug->openedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='w-60px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<?php
@@ -292,6 +292,7 @@
<?php endif;?>
<?php echo sprintf('%03d', $bug->id);?>
</td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
<td class='c-severity'>
<?php if($hasCustomSeverity):?>
<span class='<?php echo 'label-severity-custom';?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span>
@@ -299,7 +300,6 @@
<span class='label-severity' data-severity='<?php echo $bug->severity;?>' title='<?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?>'></span>
<?php endif;?>
</td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
<td><span class='status-<?php echo $bug->status?>'> <?php echo $this->processStatus('bug', $bug);?></span></td>
<?php
$openedBuildName = '';
+5 -3
View File
@@ -3,6 +3,8 @@ td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
#releaseList tbody>tr:hover{background-color: unset!important;}
.main-table tbody>tr>td:first-child{padding: 2px 8px!important;}
.c-id {width: 60px}
.c-branch {width: 100px}
.c-project, c-build {width: 200px;}
#releaseList th, #releaseList td{padding-left:16px !important;}
#releaseList .c-id {width: 60px}
#releaseList .c-branch {width: 100px}
#releaseList .c-date {width: 160px}
#releaseList .c-project, #releaseList .c-build {width: 180px;}
+12
View File
@@ -11,3 +11,15 @@ ol, ul {padding-left: 20px;}
.body-modal #mainContent {min-height: 240px;}
.c-id {width: 110px;}
td.c-build{white-space: nowrap; overflow:hidden;}
#stories th, #stories td{padding-left:16px;}
#stories .c-build{width:160px; text-align:left;}
#stories .c-status{width:120px;}
#stories .c-stage{width:130px; text-align:left;}
#stories .c-estimate{width:90px; text-align:right;}
#bugs .c-build{width:160px; text-align:left;}
#bugs .c-user{width:120px;}
#bugs .c-date{width:130px;}
#leftBugs .c-id{width:90px;}
#leftBugs .c-build{width:160px; text-align:left;}
#leftBugs .c-user{width:120px;}
+1 -1
View File
@@ -87,7 +87,7 @@
?>
</td>
<?php endif;?>
<td>
<td title='<?php echo $build ? $build->name : ''?>'>
<?php if($buildCount):?>
<?php if($product->type != 'normal'):?>
<span class='label label-outline label-badge'><?php echo $build->branchName;?></span>
+28 -28
View File
@@ -62,7 +62,7 @@
?>
<?php $vars = "releaseID={$release->id}&type=story&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
@@ -71,17 +71,17 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class="text-left"><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></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-build w-200px text-left'><?php echo $lang->build->linkedBuild;?></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>
<th class='w-90px text-center'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-100px'><?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-build'> <?php echo $lang->build->linkedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-estimate'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='c-stage'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-actions-1'><?php echo $lang->actions?></th>
</tr>
</thead>
<tbody>
<tbody class='text-center'>
<?php foreach($stories as $storyID => $story):?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id", '', true);?>
<tr>
@@ -94,20 +94,20 @@
<?php endif;?>
<?php echo sprintf('%03d', $story->id);?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td class='text-left nobr' title='<?php echo $story->title?>'>
<?php
if($story->parent > 0) echo "<span class='label label-badge label-light' title='{$lang->story->childrenAB}'>{$lang->story->childrenAB}</span>";
echo html::a($storyLink,$story->title, '', "class='preview'");
?>
</td>
<td class='c-build text-left' title='<?php echo $story->buildName?>'><?php echo $story->buildName?></td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td class='text-center'>
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td class='c-status'>
<span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span>
</td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-build' title='<?php echo $story->buildName?>'><?php echo $story->buildName?></td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td class='c-estimate' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td class='c-stage'><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'unlinkStory') and $canBeChanged)
@@ -169,14 +169,14 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</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>
<th class='c-build w-200px text-left'><?php echo $lang->bug->resolvedBuild;?></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>
<th class='c-build'> <?php echo $lang->bug->resolvedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-100px'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<th class='w-50px'> <?php echo $lang->actions;?></th>
<th class='c-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
<th class='c-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<th class='w-60px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class='text-center'>
@@ -261,13 +261,13 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-80px' title=<?php echo $lang->bug->severity;?>><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></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>
<th class='c-build w-200px text-left'><?php echo $lang->bug->openedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-150px'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='w-50px'> <?php echo $lang->actions;?></th>
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='c-build'><?php echo $lang->bug->openedBuild;?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-160px'><?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='w-60px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<?php
@@ -294,6 +294,7 @@
<?php endif;?>
<?php echo sprintf('%03d', $bug->id);?>
</td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
<td class='c-severity'>
<?php if($hasCustomSeverity):?>
<span class='<?php echo 'label-severity-custom';?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span>
@@ -301,7 +302,6 @@
<span class='label-severity' data-severity='<?php echo $bug->severity;?>' title='<?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?>'></span>
<?php endif;?>
</td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
<td><span class='status-<?php echo $bug->status?>'> <?php echo $this->processStatus('bug', $bug);?></span></td>
<?php
$openedBuildName = '';
+3
View File
@@ -1906,10 +1906,12 @@ class story extends control
$productStoryList = array();
$productList = array();
$ignoreTwins = array();
$twinsCount = 0;
foreach($stories as $story)
{
if(!empty($ignoreTwins) and isset($ignoreTwins[$story->id]))
{
$twinsCount ++;
unset($stories[$story->id]);
continue;
}
@@ -2019,6 +2021,7 @@ class story extends control
$this->view->storyType = $storyType;
$this->view->reasonList = $this->lang->story->reasonList;
$this->view->productStoryList = $productStoryList;
$this->view->twinsCount = $twinsCount;
$this->display();
}
+2
View File
@@ -24,4 +24,6 @@ $(function()
disableEmptySearch : true,
dropWidth : 'auto'
});
$('[data-toggle="popover"]').popover();
});
+12 -8
View File
@@ -106,14 +106,18 @@ $('.twins').mouseout(function() {
$(this).find('.unlink').addClass('hide');
});
$('[data-toggle="popover"]').each(function(item) {
$index = $(this).attr('data-id');
$(this).popover({
placement: 'bottom',
html: true,
content: '<div class="popover-icon"><i class="icon-info"></i></div><div class="content">' + relievedTip + '</div><div class="popover-custom text-right"><a href="javascript:relieve(' + $index + ')" class="text-active btn-info">' + relieved + '</a> <a href="javascript:popoverCancel(' + $index + ');" class="text-cancel">' + cancel + '</a></div>'
});
})
if(typeof(relievedTip) != 'undefined')
{
$('[data-toggle="popover"]').each(function(item) {
$index = $(this).attr('data-id');
$(this).popover({
placement: 'bottom',
html: true,
content: '<div class="popover-icon"><i class="icon-info"></i></div><div class="content">' + relievedTip + '</div><div class="popover-custom text-right"><a href="javascript:relieve(' + $index + ')" class="text-active btn-info">' + relieved + '</a> <a href="javascript:popoverCancel(' + $index + ');" class="text-cancel">' + cancel + '</a></div>'
});
})
}
function relieve(index)
{
+5
View File
@@ -90,4 +90,9 @@ $(function()
maxAutoDropWidth : document.body.scrollWidth + document.getElementById('duplicateStory').offsetWidth - document.getElementById('duplicateStoryBox').getBoundingClientRect().right
});
}
$('#planIdBox').click(function()
{
$('#planIdBox .chosen-container').find('div').css('width', '280px')
});
})
+3
View File
@@ -522,3 +522,6 @@ $lang->requirement->linkStory = 'Link Story';
$lang->story->addBranch = 'Add %s';
$lang->story->deleteBranch = 'Delete %s';
$lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
$lang->story->relievedTwinsRelation = 'Relieved twins relationship';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
+3
View File
@@ -522,3 +522,6 @@ $lang->requirement->linkStory = 'Link Story';
$lang->story->addBranch = 'Add %s';
$lang->story->deleteBranch = 'Delete %s';
$lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
$lang->story->relievedTwinsRelation = 'Relieved twins relationship';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
+3
View File
@@ -522,3 +522,6 @@ $lang->requirement->linkStory = 'Lier Story';
$lang->story->addBranch = 'Add %s';
$lang->story->deleteBranch = 'Delete %s';
$lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
$lang->story->relievedTwinsRelation = 'Relieved twins relationship';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
+3
View File
@@ -522,3 +522,6 @@ $lang->requirement->linkStory = "关联{$lang->SRCommon}";
$lang->story->addBranch = '添加%s';
$lang->story->deleteBranch = '删除%s';
$lang->story->notice->branch = '每个分支会建立一个需求,需求间互为孪生关系。孪生需求间除产品、分支、模块、计划、阶段字段外均保持同步,后期您可以手动解除孪生关系。';
$lang->story->relievedTwinsRelation = '解除孪生关系';
$lang->story->relievedTwinsRelationTips = '孪生关系解除后无法恢复,需求的关闭将不再同步。';
+24 -3
View File
@@ -2014,6 +2014,7 @@ class storyModel extends model
->stripTags($this->config->story->editor->close['id'], $this->config->allowedTags)
->removeIF($this->post->closedReason != 'duplicate', 'duplicateStory')
->removeIF($this->post->closedReason != 'subdivided', 'childStories')
->remove('closeSync')
->get();
if(!empty($story->duplicateStory))
@@ -2050,7 +2051,18 @@ class storyModel extends model
}
$changes = common::createChanges($oldStory, $story);
if(!empty($oldStory->twins)) $this->syncTwins($storyID, $oldStory->twins, $changes, 'Closed');
if($this->post->closeSync)
{
/* batchUnset twinID from twins.*/
$replaceSql = "UPDATE " . TABLE_STORY . " SET twins = REPLACE(twins,',$storyID,', ',') WHERE `product` = $oldStory->product";
$this->dbh->exec($replaceSql);
/* Update twins to empty by twinID and if twins eq ','.*/
$this->dao->update(TABLE_STORY)->set('twins')->eq('')->where('id')->eq($storyID)->orWhere('twins')->eq(',')->exec();
if(!dao::isError()) $this->loadModel('action')->create('story', $storyID, 'relieved');
}
if(!empty($oldStory->twins) and !$this->post->closeSync) $this->syncTwins($storyID, $oldStory->twins, $changes, 'Closed');
return $changes;
}
@@ -2215,8 +2227,17 @@ class storyModel extends model
if($planID == 0 and !empty($oldStory->plan) and isset($branchPlanPairs[0]) and $branchPlanPairs[0] != $planID) $unlinkPlans[$branchPlanPairs[0]] = empty($unlinkPlans[$branchPlanPairs[0]]) ? $storyID : "{$unlinkPlans[$branchPlanPairs[0]]},$storyID";
if($planID != 0)
{
if(!empty($oldStory->plan) and isset($branchPlanPairs[$plan->branch]) and $branchPlanPairs[$plan->branch] != $planID) $unlinkPlans[$branchPlanPairs[$plan->branch]] = empty($unlinkPlans[$branchPlanPairs[$plan->branch]]) ? $storyID : "{$unlinkPlans[$branchPlanPairs[$plan->branch]]},$storyID";
if(isset($branchPlanPairs[$plan->branch])) $branchPlanPairs[$plan->branch] = $planID;
if(!empty($oldStory->plan))
{
foreach(explode(',', $plan->branch) as $planBranch)
{
if(isset($branchPlanPairs[$planBranch]) and $branchPlanPairs[$planBranch] != $planID)
{
$unlinkPlans[$branchPlanPairs[$planBranch]] = empty($unlinkPlans[$branchPlanPairs[$planBranch]]) ? $storyID : "{$unlinkPlans[$branchPlanPairs[$planBranch]]},$storyID";
}
}
}
foreach(explode(',', $plan->branch) as $planBranch) if(isset($branchPlanPairs[$planBranch])) $branchPlanPairs[$planBranch] = $planID;
$story->plan = $oldStory->plan ? implode(',', $branchPlanPairs) : $planID;
$story->plan = trim($story->plan, ',');
if($story->plan != $oldStory->plan and !empty($planID)) $link2Plans[$planID] = empty($link2Plans[$planID]) ? $storyID : "{$link2Plans[$planID]},$storyID";
+6 -1
View File
@@ -34,7 +34,12 @@
<?php foreach($stories as $storyID => $story):?>
<tr class='text-center'>
<td><?php echo $storyID . html::hidden("storyIdList[$storyID]", $storyID);?></td>
<td class='text-left'><?php echo $story->title;?></td>
<td title='<?php echo $story->title;?>' class='text-left'>
<?php echo $story->title;?>
<?php if(!empty($story->twins)):?>
<span class='label label-outline label-badge'><?php echo "{$lang->story->twins}:"?> <span class='text-blue'><?php echo $twinsCount?></span></span>
<?php endif;?>
</td>
<td class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></td>
<td class='reasons-td'>
<?php if($story->status == 'draft') unset($reasonList['cancel']);?>
+11 -8
View File
@@ -26,14 +26,17 @@
<table class='table table-form'>
<tr>
<th class='thWidth'><?php echo $lang->story->closedReason;?></th>
<td class='w-p25-f'><?php echo html::select('closedReason', $reasonList, '', 'class="form-control" onchange="setStory(this.value)"');?></td><td></td>
</tr>
<?php if(!empty($story->twins)):?>
<tr>
<th></th>
<td colspan='2'><i class='icon-exclamation-sign'></i> <?php echo $lang->story->closeSyncTip;?></td>
</tr>
<?php endif;?>
<td class='w-p25-f'><?php echo html::select('closedReason', $reasonList, '', 'class="form-control" onchange="setStory(this.value)"');?></td>
<td class='closeSyncBox'>
<div class="checkbox-primary c-future <?php echo !empty($story->twins) ? '' : 'hidden';?>" style="display: inline-block">
<input type='checkbox' id='closeSync' name='closeSync' value='1' />
<label for='closeSync'>
<?php echo $lang->story->relievedTwinsRelation;?>
</label>
</div>
<div style="display: inline-block"><icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->story->relievedTwinsRelationTips;?>"></icon></div>
</td>
</tr>
<tr id='duplicateStoryBox' style='display:none'>
<th><?php echo $lang->story->duplicateStory;?></th>
<td class='required'><?php echo html::select('duplicateStory', array('' => '') + $productStories, '', "class='form-control' placeholder='{$lang->bug->duplicateTip}'"); ?></td><td></td>
+31 -5
View File
@@ -7,6 +7,33 @@ $(function()
{
$('#consumedSpan').parent().find('button').attr('disabled','disabled')
}
$('#mode').change(function()
{
var mode = $(this).val();
if(mode != 'single')
{
if(mode != 'multi')
{
$('#assignedTo').attr('disabled', 'disabled').trigger('chosen:updated')
}
else
{
$('#assignedTo').removeAttr('disabled').trigger('chosen:updated')
}
$('.team-group').removeClass('hidden');
$('#estimate').attr('disabled', 'disabled')
$('#left').attr('disabled', 'disabled')
}
else
{
$('#assignedTo').removeAttr('disabled').trigger('chosen:updated')
$('.team-group').addClass('hidden');
$('#estimate').attr('disabled', false)
$('#left').attr('disabled', false)
}
})
})
/**
@@ -118,7 +145,7 @@ $('#confirmButton').click(function()
var $left = $tr.find('[name^=teamLeft]');
var left = parseFloat($left.val());
if(!isNaN(left)) totalLeft += left;
if(!$left.prop('readonly') && (isNaN(left) || left <= 0))
if(!$left.prop('readonly') && (isNaN(left) || left <= 0) && team.length > 0)
{
bootbox.alert(account + ' ' + leftNotEmpty);
error = true;
@@ -165,12 +192,11 @@ $('#confirmButton').click(function()
function updateAssignedTo()
{
var html = '';
var multiple = $('#multiple').prop('checked');
var mode = $('#mode').val();
var assignedTo = $('#assignedTo').val();
if(multiple)
if(mode != 'single')
{
var isTeamMember = false;
var mode = $('#mode').val();
$('select[name^=team]').each(function()
{
if($(this).find('option:selected').text() == '') return;
@@ -202,6 +228,6 @@ function updateAssignedTo()
}
$('#assignedTo').html(html);
if(multiple && mode == 'linear' && $('#modalTeam tr.member-doing').length == 0 && $('#modalTeam tr.member-wait').length >= 1) $('[name=assignedTo]').val($('#modalTeam tr.member-wait:first').find('select[name^=team]:first').val());
if(mode != 'single' && mode == 'linear' && $('#modalTeam tr.member-doing').length == 0 && $('#modalTeam tr.member-wait').length >= 1) $('[name=assignedTo]').val($('#modalTeam tr.member-wait:first').find('select[name^=team]:first').val());
$('#assignedTo').trigger('chosen:updated');
}
+6 -2
View File
@@ -212,8 +212,12 @@ $lang->task->reasonList[''] = '';
$lang->task->reasonList['done'] = 'Erledigt';
$lang->task->reasonList['cancel'] = 'Abgebrochen';
$lang->task->modeList['linear'] = 'Serial';
$lang->task->modeList['multi'] = 'Parallel';
$lang->task->modeList['linear'] = 'Multiple Person Serial';
$lang->task->modeList['multi'] = 'Multiple Person Parallel';
$lang->task->editModeList['single'] = 'Single';
$lang->task->editModeList['linear'] = 'Serial';
$lang->task->editModeList['multi'] = 'Parallel';
$lang->task->afterChoices['continueAdding'] = ' Weitere Aufgaben erfassen';
$lang->task->afterChoices['toTaskList'] = 'Zurück zur Aufgabenliste';
+6 -2
View File
@@ -212,8 +212,12 @@ $lang->task->reasonList[''] = '';
$lang->task->reasonList['done'] = 'Done';
$lang->task->reasonList['cancel'] = 'Cancelled';
$lang->task->modeList['linear'] = 'Serial';
$lang->task->modeList['multi'] = 'Parallel';
$lang->task->modeList['linear'] = 'Multiple Person Serial';
$lang->task->modeList['multi'] = 'Multiple Person Parallel';
$lang->task->editModeList['single'] = 'Single';
$lang->task->editModeList['linear'] = 'Serial';
$lang->task->editModeList['multi'] = 'Parallel';
$lang->task->afterChoices['continueAdding'] = ' Continue Adding Tasks';
$lang->task->afterChoices['toTaskList'] = 'Go to Task List';
+2 -2
View File
@@ -212,8 +212,8 @@ $lang->task->reasonList[''] = '';
$lang->task->reasonList['done'] = 'Fait';
$lang->task->reasonList['cancel'] = 'Annulé';
$lang->task->modeList['linear'] = 'Serial';
$lang->task->modeList['multi'] = 'Parallel';
$lang->task->modeList['linear'] = 'Multiple Person Serial';
$lang->task->modeList['multi'] = 'Multiple Person Parallel';
$lang->task->afterChoices['continueAdding'] = ' Continuer Ajouter Tâches';
$lang->task->afterChoices['toTaskList'] = 'Aller à la liste des Tâches';
+6 -2
View File
@@ -212,8 +212,12 @@ $lang->task->reasonList[''] = '';
$lang->task->reasonList['done'] = '已完成';
$lang->task->reasonList['cancel'] = '已取消';
$lang->task->modeList['linear'] = '串行';
$lang->task->modeList['multi'] = '并行';
$lang->task->modeList['linear'] = '多人串行';
$lang->task->modeList['multi'] = '多人并行';
$lang->task->editModeList['single'] = '单人任务';
$lang->task->editModeList['linear'] = '多人串行';
$lang->task->editModeList['multi'] = '多人并行';
$lang->task->afterChoices['continueAdding'] = "继续为该{$lang->SRCommon}添加任务";
$lang->task->afterChoices['toTaskList'] = '返回任务列表';
+12 -1
View File
@@ -153,7 +153,12 @@ class taskModel extends model
$requiredFields = trim($requiredFields, ',');
/* Fix Bug #2466 */
if($this->post->multiple) $task->assignedTo = '';
if($this->post->multiple) $task->assignedTo = '';
if($task->mode == 'multi')
{
$task->assignedTo = isset($_POST['team'][0]) ? $_POST['team'][0] : '';
$task->assignedDate = helper::now();
}
if(!$this->post->multiple or count(array_filter($this->post->team)) < 1) $task->mode = '';
$this->dao->insert(TABLE_TASK)->data($task, $skip = 'gitlab,gitlabProject')
->autoCheck()
@@ -1094,6 +1099,7 @@ class taskModel extends model
->setIF(strpos($this->config->task->edit->requiredFields, 'story') !== false, 'story', $this->post->story)
->setIF($this->post->story != false and $this->post->story != $oldTask->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
->setIF($this->post->mode == 'single', 'mode', '')
->setIF($this->post->status == 'done', 'left', 0)
->setIF($this->post->status == 'done' and !$this->post->finishedBy, 'finishedBy', $this->app->user->account)
->setIF($this->post->status == 'done' and !$this->post->finishedDate, 'finishedDate', $now)
@@ -1193,6 +1199,11 @@ class taskModel extends model
$this->dao->update(TABLE_TASK)->set('designVersion')->eq($design->version)->where('id')->eq($taskID)->exec();
}
if($_POST['mode'] == 'single')
{
$this->dao->delete()->from(TABLE_TASKTEAM)->where('task')->eq($taskID)->exec();
}
/* Record task version. */
if(isset($task->version) and $task->version > $oldTask->version)
{
+3 -6
View File
@@ -79,16 +79,13 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
</div>
</td>
<td>
<div class="checkbox-primary c-multipleTask affair">
<div class="checkbox-primary c-multipleTask affair" style='display: inline-block'>
<input type="checkbox" name="multiple" value="1" id="multipleBox" /><label for="multipleBox" class="no-margin"><?php echo $lang->task->multiple;?></label>
</div>
<button id='selectAllUser' type="button" class="btn btn-link<?php if($task->type !== 'affair') echo ' hidden';?>"><?php echo $lang->task->selectAllUser;?></button>
<div class='hidden modeBox' style='display: inline-block'><?php echo html::radio('mode', $lang->task->modeList, !empty($task->mode) ? $task->mode: 'linear');?></div>
<button id='selectAllUser' type="button" class="btn btn-link<?php if($task->type !== 'affair') echo ' hidden';?>"><?php echo $lang->task->selectAllUser;?></button>
</td>
</tr>
<tr class='hidden modeBox'>
<th><?php echo $lang->task->mode;?></th>
<td><?php echo html::select('mode', $lang->task->modeList, $task->mode, "class='form-control chosen'");?></td>
</tr>
<?php if($execution->type == 'kanban'):?>
<tr>
<th><?php echo $lang->kanbancard->region;?></th>
+20 -28
View File
@@ -22,8 +22,8 @@
<?php js::set('currentUser', $app->user->account);?>
<?php js::set('team', $task->members);?>
<?php js::set('members', $members);?>
<?php js::set('page', 'edit');?>
<?php js::set('confirmChangeExecution', $lang->task->confirmChangeExecution);?>
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
<?php js::set('totalLeftError', sprintf($this->lang->task->error->leftEmptyAB, $this->lang->task->statusList[$task->status]));?>
<?php js::set('estimateNotEmpty', sprintf($lang->error->gt, $lang->task->estimate, '0'))?>
@@ -52,25 +52,15 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
<div class='detail-title'><?php echo $lang->task->name;?></div>
<div class='detail-content'>
<div class='form-group'>
<div class='<?php if(empty($task->children) and empty($task->parent) and $task->type != 'affair') echo 'input-group';?>'>
<div class="input-control has-icon-right">
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $task->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".task-name" data-provide="colorpicker">
</div>
<?php echo html::input('name', $task->name, 'class="form-control task-name" placeholder="' . $lang->task->name . '"');?>
<div class="input-control has-icon-right">
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $task->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".task-name" data-provide="colorpicker">
</div>
<?php if(empty($task->children) and empty($task->parent) and $task->type != 'affair'):?>
<span class='input-group-addon'>
<div class='checkbox-primary'>
<input type='checkBox' name='multiple' id='multiple' value='1' disabled <?php echo empty($task->team) ? '' : 'checked';?> />
<label for='multiple'><?php echo $lang->task->multipleAB;?></label>
</div>
</span>
<?php endif;?>
<?php echo html::input('name', $task->name, 'class="form-control task-name" placeholder="' . $lang->task->name . '"');?>
</div>
</div>
</div>
@@ -140,6 +130,10 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
<td><?php echo html::select('parent', $tasks, $task->parent, "class='form-control chosen'");?></td>
</tr>
<?php endif;?>
<tr class="modeBox">
<th><?php echo $lang->task->mode;?></th>
<td><?php echo $task->status == 'wait' ? html::select('mode', $lang->task->editModeList, $task->mode, "class='form-control chosen'") : zget($lang->task->editModeList, $task->mode);?></td>
</tr>
<tr>
<th><?php echo $lang->task->assignedTo;?></th>
<?php $disableAssignedTo = (!empty($task->team) and $task->mode == 'linear') ? "disabled='disabled'" : '';?>
@@ -159,15 +153,13 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
$taskMembers = $members;
}
?>
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $taskMembers, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></span></td>
</tr>
<tr class="modeBox <?php echo $task->mode ? '' : 'hidden';?>">
<th><?php echo $lang->task->mode;?></th>
<td><?php echo zget($lang->task->modeList, $task->mode) . html::hidden('mode', $task->mode);?></td>
</tr>
<tr class='<?php echo empty($task->team) ? 'hidden' : ''?>' id='teamTr'>
<th><?php echo $lang->task->team;?></th>
<td><?php echo html::a('#modalTeam', $lang->task->team, '', "class='form-control btn' data-toggle='modal'");?></td>
<td>
<div class='input-group' id='assignedToIdBox'>
<?php $hiddenTeam = $task->mode != '' ? '' : 'hidden';?>
<?php echo html::select('assignedTo', $taskMembers, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?>
<span class="input-group-btn team-group <?php echo $hiddenTeam;?>"><a class="btn br-0" href="#modalTeam" data-toggle="modal"><?php echo $lang->task->team;?></a></span>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->task->type;?></th>
+1 -2
View File
@@ -8,7 +8,6 @@
<?php if($app->rawMethod != 'create'):?>
<style>
#modalTeam .modal-dialog {width: 855px;}
#taskTeamEditor .hourBox {padding-bottom: 1px;}
</style>
<?php endif;?>
<?php if($app->rawMethod == 'assignto'):?>
@@ -341,7 +340,7 @@ $(document).ready(function()
$(this).find('option:disabled').removeAttr('disabled').trigger("chosen:updated");
})
}
if($('#teamMember').val() != '') $taskTeamEditor.find('tfoot .btn').click();
if($('#teamMember').val() != '' && page != 'edit') $taskTeamEditor.find('tfoot .btn').click();
})
});
+3 -3
View File
@@ -339,9 +339,9 @@
<thead>
<tr>
<th><?php echo $lang->task->team?></th>
<th class='text-center c-hours'><?php echo $lang->task->estimate?></th>
<th class='text-center c-hours'><?php echo $lang->task->consumed?></th>
<th class='text-center c-hours'><?php echo $lang->task->left?></th>
<th class='text-center c-hours'><?php echo $lang->task->estimateAB?></th>
<th class='text-center c-hours'><?php echo $lang->task->consumedAB?></th>
<th class='text-center c-hours'><?php echo $lang->task->leftAB?></th>
<th class='text-center'><?php echo $lang->statusAB;?></th>
</tr>
</thead>
+1 -1
View File
@@ -668,7 +668,7 @@ class todo extends control
* AJAX: get program id.
*
* @param int $objectID
* @param varchar $objectType
* @param string $objectType
* @access public
* @return void
*/
+3 -1
View File
@@ -3,7 +3,9 @@
* This file is used to compress css and js files.
*/
$baseDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname(__FILE__));
include $baseDir . '/framework/helper.class.php';
//$miniCSSTool = getenv('MINIFY_CSS_PATH');
//$miniJSTool = getenv('MINIFY_JS_PATH');
$miniCSSTool = '/home/z/ci/minify/minifyCSS.php';