diff --git a/module/action/lang/en.php b/module/action/lang/en.php index a1539cb4e2..c6c7e56262 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -405,22 +405,37 @@ $lang->action->dynamicAction->execution['undeleted'] = 'Restore ' . $lang->execu $lang->action->dynamicAction->execution['hidden'] = 'Hide ' . $lang->executionCommon; $lang->action->dynamicAction->execution['moved'] = 'Improt Task'; -$lang->action->dynamicAction->kanban['create'] = 'Create Kanban'; -$lang->action->dynamicAction->kanban['edited'] = 'Kanban Settings'; +$lang->action->dynamicAction->kanban['created'] = 'Create Kanban'; +$lang->action->dynamicAction->kanban['edited'] = 'Kanban Settings'; +$lang->action->dynamicAction->kanban['closed'] = 'Close Kanban'; +$lang->action->dynamicAction->kanban['deleted'] = 'Delete Kanban'; -$lang->action->dynamicAction->kanbanspace['create'] = 'Create Space'; -$lang->action->dynamicAction->kanbanspace['edited'] = 'Space Settings'; -$lang->action->dynamicAction->kanbanspace['closed'] = 'Close Kanban'; +$lang->action->dynamicAction->kanbanspace['created'] = 'Create Space'; +$lang->action->dynamicAction->kanbanspace['edited'] = 'Space Settings'; +$lang->action->dynamicAction->kanbanspace['closed'] = 'Close Space'; +$lang->action->dynamicAction->kanbanspace['deleted'] = 'Deleted Space'; -$lang->action->dynamicAction->kanbancolumn['create'] = 'Create Column'; -$lang->action->dynamicAction->kanbancolumn['edited'] = 'Column Settings'; +$lang->action->dynamicAction->kanbanregion['created'] = 'Create Region'; +$lang->action->dynamicAction->kanbanregion['edited'] = 'Edit Region'; +$lang->action->dynamicAction->kanbanregion['deleted'] = 'Delete Region'; -$lang->action->dynamicAction->kanbanlane['created'] = 'Create Swimlane'; -$lang->action->dynamicAction->kanbanlane['edited'] = 'Swimlane Settings'; -$lang->action->dynamicAction->kanbanlane['moved'] = 'Move Swimlane'; +$lang->action->dynamicAction->kanbancolumn['created'] = 'Create Column'; +$lang->action->dynamicAction->kanbancolumn['edited'] = 'Column Settings'; +$lang->action->dynamicAction->kanbancolumn['archived'] = 'Archive Column'; +$lang->action->dynamicAction->kanbancolumn['restore'] = 'Restore Column'; +$lang->action->dynamicAction->kanbancolumn['deleted'] = 'Delete Column'; -$lang->action->dynamicAction->kanbancard['create'] = 'Create Card'; -$lang->action->dynamicAction->kanbancard['edited'] = 'Edit card'; +$lang->action->dynamicAction->kanbanlane['created'] = 'Create Lane'; +$lang->action->dynamicAction->kanbanlane['edited'] = 'Lane Settings'; +$lang->action->dynamicAction->kanbanlane['moved'] = 'Move Lane'; +$lang->action->dynamicAction->kanbanlane['deleted'] = 'Delete Lane'; + +$lang->action->dynamicAction->kanbancard['created'] = 'Create Card'; +$lang->action->dynamicAction->kanbancard['edited'] = 'Edit Card'; +$lang->action->dynamicAction->kanbancard['commented'] = 'Comment Card'; +$lang->action->dynamicAction->kanbancard['archived'] = 'Archive Card'; +$lang->action->dynamicAction->kanbancard['restore'] = 'Restore Card'; +$lang->action->dynamicAction->kanbancard['deleted'] = 'Delete Card'; $lang->action->dynamicAction->team['managedTeam'] = 'Manage Team'; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 172fba68d3..5f043c6650 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -405,22 +405,37 @@ $lang->action->dynamicAction->execution['undeleted'] = '还原' . $lang->executi $lang->action->dynamicAction->execution['hidden'] = '隐藏' . $lang->executionCommon; $lang->action->dynamicAction->execution['moved'] = '导入任务'; -$lang->action->dynamicAction->kanban['create'] = '创建看板'; -$lang->action->dynamicAction->kanban['edited'] = '设置看板'; +$lang->action->dynamicAction->kanban['created'] = '创建看板'; +$lang->action->dynamicAction->kanban['edited'] = '设置看板'; +$lang->action->dynamicAction->kanban['closed'] = '关闭看板'; +$lang->action->dynamicAction->kanban['deleted'] = '删除看板'; -$lang->action->dynamicAction->kanbanspace['create'] = '创建看板空间'; -$lang->action->dynamicAction->kanbanspace['edited'] = '设置看板空间'; -$lang->action->dynamicAction->kanbanspace['closed'] = '关闭看板空间'; +$lang->action->dynamicAction->kanbanspace['created'] = '创建看板空间'; +$lang->action->dynamicAction->kanbanspace['edited'] = '设置看板空间'; +$lang->action->dynamicAction->kanbanspace['closed'] = '关闭看板空间'; +$lang->action->dynamicAction->kanbanspace['deleted'] = '删除看板空间'; -$lang->action->dynamicAction->kanbancolumn['create'] = '创建看板列'; -$lang->action->dynamicAction->kanbancolumn['edited'] = '设置看板列'; +$lang->action->dynamicAction->kanbanregion['created'] = '创建看板区域'; +$lang->action->dynamicAction->kanbanregion['edited'] = '编辑看板区域'; +$lang->action->dynamicAction->kanbanregion['deleted'] = '删除看板区域'; -$lang->action->dynamicAction->kanbanlane['created'] = '创建泳道'; -$lang->action->dynamicAction->kanbanlane['edited'] = '设置泳道'; -$lang->action->dynamicAction->kanbanlane['moved'] = '移动泳道'; +$lang->action->dynamicAction->kanbancolumn['created'] = '创建看板列'; +$lang->action->dynamicAction->kanbancolumn['edited'] = '设置看板列'; +$lang->action->dynamicAction->kanbancolumn['archived'] = '归档看板列'; +$lang->action->dynamicAction->kanbancolumn['restore'] = '还原看板列'; +$lang->action->dynamicAction->kanbancolumn['deleted'] = '删除看板列'; -$lang->action->dynamicAction->kanbancard['create'] = '创建看板卡片'; -$lang->action->dynamicAction->kanbancard['edited'] = '编辑看板卡片'; +$lang->action->dynamicAction->kanbanlane['created'] = '创建泳道'; +$lang->action->dynamicAction->kanbanlane['edited'] = '设置泳道'; +$lang->action->dynamicAction->kanbanlane['moved'] = '移动泳道'; +$lang->action->dynamicAction->kanbanlane['deleted'] = '删除泳道'; + +$lang->action->dynamicAction->kanbancard['created'] = '创建看板卡片'; +$lang->action->dynamicAction->kanbancard['edited'] = '编辑看板卡片'; +$lang->action->dynamicAction->kanbancard['commented'] = '备注看板卡片'; +$lang->action->dynamicAction->kanbancard['archived'] = '归档看板卡片'; +$lang->action->dynamicAction->kanbancard['restore'] = '还原看板卡片'; +$lang->action->dynamicAction->kanbancard['deleted'] = '删除看板卡片'; $lang->action->dynamicAction->team['managedTeam'] = '维护团队'; diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 8e359d54cb..772c24ff55 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -73,7 +73,7 @@ } elseif($action->objectType == 'kanbancard') { - echo html::a($this->createLink('kanban', 'viewCard', "id=$action->objectID", '', true), $action->objectName, '', "title={$action->objectName} class='iframe'"); + echo html::a($this->createLink('kanban', 'viewCard', "id=$action->objectID", '', true), $action->objectName, '', "title={$action->objectName} class='iframe' data-width=80%"); } else { diff --git a/module/api/css/index.css b/module/api/css/index.css index 228854c88d..2b3b4a18de 100644 --- a/module/api/css/index.css +++ b/module/api/css/index.css @@ -11,7 +11,7 @@ .main-col .doc-title {display: flex; font-size: 16px; margin-bottom: 15px;} .main-col .doc-title .title {margin: 0; line-height: 30px; font-size: 25px;} .main-col .doc-title .http-method {line-height: 27px; height: 27px; font-size: 13px; margin-right: 10px; padding: 0 10px;} -.main-col .doc-title .path { line-height: 30px; font-size: 20px; margin-right: 15px;width:60%;word-wrap: break-word; } +.main-col .doc-title .path {line-height: 30px; font-size: 20px; margin-right: 15px; word-wrap: break-word;} .main-col .doc-title .info {flex: 1 1 0;} .main-col .doc-title .version a {font-size: 13px; color: #8c8c8c;} .main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;} @@ -107,7 +107,7 @@ padding-right: 10px; } .detail .list-group-item {list-style: none; font-size: 14px; margin-bottom: 10px; line-height: 30px} -.detail .list-group-item span {line-height: 30px; width: 50px;} +.detail .list-group-item span {line-height: 30px; width: 65px;} .detail .list-group-item .label+.label {margin-left: -4px;} .detail .list-group-item .label {border-radius: 0;} diff --git a/module/api/view/index.html.php b/module/api/view/index.html.php index ba0656c6c2..e77975a522 100644 --- a/module/api/view/index.html.php +++ b/module/api/view/index.html.php @@ -81,7 +81,6 @@
lib}&moduleID=0&apiID={$api->id}&version=0&release=$release");?>"> method;?> - status);?> path;?> title;?> diff --git a/module/branch/control.php b/module/branch/control.php index 0181b053e6..5c9b516a1d 100644 --- a/module/branch/control.php +++ b/module/branch/control.php @@ -325,4 +325,18 @@ class branch extends control return $this->send(array('message' => $this->lang->saveSuccess, 'result' => 'success')); } + + /** + * AJAX: Get target branches for merge branch. + * + * @param int $productID + * @param string $mergedBranches + * @access public + * @return string + */ + public function ajaxGetTargetBranches($productID, $mergedBranches = '') + { + $branchPairs = $this->branch->getPairs($productID, 'active', 0, $mergedBranches); + return print(html::select('targetBranch', $branchPairs, '', "class='form-control chosen'")); + } } diff --git a/module/branch/css/manage.css b/module/branch/css/manage.css index a34994347c..edaa96f5ca 100644 --- a/module/branch/css/manage.css +++ b/module/branch/css/manage.css @@ -9,3 +9,4 @@ td.flex .label-primary {min-width: 40px;} td.flex .setDefault {min-width: 120px;} #mergeBranch .form-actions {padding-top: 20px;} +.modal-body {padding-top: 0;} diff --git a/module/branch/js/manage.js b/module/branch/js/manage.js index 89e2faa12a..49f87ac8e8 100644 --- a/module/branch/js/manage.js +++ b/module/branch/js/manage.js @@ -65,8 +65,8 @@ $(function() { $('#targetBranch').attr('disabled', true).trigger('chosen:updated'); - var newBranchName = '' + branchLang.name + ""; - var newBranchDesc = '' + branchLang.desc + ""; + var newBranchName = '' + branchLang.name + ""; + var newBranchDesc = '' + branchLang.desc + ""; $(this).closest('tr').after(newBranchName + newBranchDesc); } else @@ -78,35 +78,87 @@ $(function() } }); - $('#saveButton').on('click', function() + $("#merge").click(function() { var mergedBranchIDList = []; + var mergedBranchName = ''; + $("input:checkbox[name^='branchIDList']:checked").each(function() { mergedBranchIDList.push($(this).val()); + mergedBranchName += ',' + $(this).closest('tr').find('.branchName').attr('title'); + }); + mergedBranchName = mergedBranchName.substr(1); + mergedBranchIDList = mergedBranchIDList.join(','); + + $.get(createLink('branch', 'ajaxGetTargetBranches', "productID=" + productID + "&mergedBranches=" + mergedBranchIDList), function(data) + { + $('#targetBranch').replaceWith(data); + $('#targetBranch_chosen').remove(); + $('#targetBranch').chosen(); + + if($('#createBranch').prop('checked')) $('#targetBranch').attr('disabled', true).trigger('chosen:updated') + }) + }) + + $('#saveButton').on('click', function() + { + var mergedBranchIDList = []; + var mergedBranchName = ''; + var targetBranchName = $('#targetBranch_chosen').find('span').text(); + + $("input:checkbox[name^='branchIDList']:checked").each(function() + { + mergedBranchIDList.push($(this).val()); + mergedBranchName += ',' + $(this).closest('tr').find('.branchName').attr('title'); }); + mergedBranchName = mergedBranchName.substr(1); + targetBranchName = $('#createBranch').prop('checked') ? $('#name').val() : targetBranchName; + + var confirmMergeMessage = branchLang.confirmMerge.replace(/(.*)mergedBranch(.*)targetBranch(.*)/, "$1" + mergedBranchName + "$2" + targetBranchName + "$3"); + var isChecked = $('#createBranch').attr('checked') ? 1 : 0; - var postData = {'name' : $('#name').val(), 'desc' : $('#desc').val(), 'createBranch' : isChecked, 'mergedBranchIDList' : mergedBranchIDList, 'targetBranch' : $('#targetBranch').val()}; - $.ajax( + if(isChecked && $('#name').val() == '') { - url: createLink('branch', 'mergeBranch', 'productID=' + productID), - dataType: 'json', - method: 'post', - data: postData, - success: function(data) + alert(branchLang.nameNotEmpty); + return false; + } + + var branchNames = Object.values(branchPairs); + if(isChecked && branchNames.includes($('#name').val()) !== -1) + { + alert(branchLang.existName); + return false; + } + + if(confirm(confirmMergeMessage)) + { + var postData = {'name' : $('#name').val(), 'desc' : $('#desc').val(), 'createBranch' : isChecked, 'mergedBranchIDList' : mergedBranchIDList, 'targetBranch' : $('#targetBranch').val()}; + $.ajax( { - if(data.result == 'fail') + url: createLink('branch', 'mergeBranch', 'productID=' + productID), + dataType: 'json', + method: 'post', + data: postData, + success: function(data) { - alert(data.message.name) - return false; + if(data.result == 'fail') + { + alert(data.message.name) + return false; + } + else + { + $('#mergeBranch').modal('hide'); + window.location.reload(); + } } - else - { - $('#mergeBranch').modal('hide'); - window.location.reload(); - } - } - }) + }) + } + else + { + window.location.reload(); + } }); }) diff --git a/module/branch/lang/en.php b/module/branch/lang/en.php index 45a74d62be..6f6292b986 100644 --- a/module/branch/lang/en.php +++ b/module/branch/lang/en.php @@ -22,7 +22,7 @@ $lang->branch->batchEdit = 'Batch Edit'; $lang->branch->defaultBranch = 'Default Branch'; $lang->branch->setDefault = 'Set Default'; $lang->branch->setDefaultAction = 'Set Default'; -$lang->branch->mergeTo = 'Merge branch to'; +$lang->branch->mergeTo = 'Merge to'; $lang->branch->mergeBranch = 'Merge branch'; $lang->branch->mergeBranchAction = 'Merge branch'; @@ -45,8 +45,10 @@ $lang->branch->nameNotEmpty = 'Name must not be empty!'; $lang->branch->confirmClose = 'Do you want to close this @branch@?'; $lang->branch->confirmActivate = 'Do you want to activate this @branch@?'; $lang->branch->existName = '@branch@ name already exists.'; -$lang->branch->mergeTips = '(Trunk does not support being merged. After the branch is merged, the corresponding releases, plans, modules, requirements, bugs, and cases under the branch will be merged into the new branch)'; -$lang->branch->targetBranchTips = 'Note: You can merge it into an existing branch, merge it into the trunk, or create a new branch.'; +$lang->branch->mergedMain = 'Trunk does not support being merged.'; +$lang->branch->mergeTips = 'After the branch is merged, the corresponding releases, plans, modules, requirements, bugs, and cases under the branch will be merged into the new branch'; +$lang->branch->targetBranchTips = 'You can merge it into an existing branch, merge it into the trunk, or create a new branch.'; +$lang->branch->confirmMerge = 'The data of "mergedBranch" will be merged into "targetBranch", please confirm whether you want to perform the branch merge operation, the data will not be restored after the merge!'; $lang->branch->noData = 'No branches.'; $lang->branch->mainBranch = 'The default main %s of the product.'; diff --git a/module/branch/lang/zh-cn.php b/module/branch/lang/zh-cn.php index d839898ad8..4b8ea184ba 100644 --- a/module/branch/lang/zh-cn.php +++ b/module/branch/lang/zh-cn.php @@ -45,8 +45,10 @@ $lang->branch->nameNotEmpty = '名称不能为空!'; $lang->branch->confirmClose = '是否关闭该@branch@?'; $lang->branch->confirmActivate = '是否激活该@branch@?'; $lang->branch->existName = '@branch@名称已存在'; -$lang->branch->mergeTips = '(主干不支持被合并,合并@branch@后,会将@branch@下面对应的发布、计划、模块、需求、Bug、用例都合并到新的@branch@下)'; -$lang->branch->targetBranchTips = '注:您可以将其合并到已有的一个@branch@,也可以合并到主干,也可以新创建一个@branch@。'; +$lang->branch->mergedMain = '主干不支持被合并。'; +$lang->branch->mergeTips = '合并@branch@后,会将@branch@下面对应的发布、计划、模块、需求、Bug、用例都合并到新的@branch@下'; +$lang->branch->targetBranchTips = '您可以将其合并到已有的一个@branch@,也可以合并到主干,也可以新创建一个@branch@。'; +$lang->branch->confirmMerge = '"mergedBranch"的数据将被合并到"targetBranch",请确认是否要执行分支合并操作,合并后数据将不可再恢复!'; $lang->branch->noData = '暂时没有分支。'; $lang->branch->mainBranch = '产品默认主干%s。'; diff --git a/module/branch/model.php b/module/branch/model.php index 4b1a59861d..a724be195a 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -96,10 +96,11 @@ class branchModel extends model * @param int $productID * @param string $params * @param int $executionID + * @param string $mergedBranches * @access public * @return array */ - public function getPairs($productID, $params = '', $executionID = 0) + public function getPairs($productID, $params = '', $executionID = 0, $mergedBranches = '') { $executionBranches = array(); if($executionID) @@ -116,6 +117,7 @@ class branchModel extends model ->beginIF($productID)->andWhere('product')->eq($productID)->fi() ->beginIF($productID and $executionID)->andWhere('id')->in(array_keys($executionBranches))->fi() ->beginIF(strpos($params, 'active') !== false)->andWhere('status')->eq('active')->fi() + ->beginIF(!empty($mergedBranches))->andWhere('id')->notIN($mergedBranches)->fi() ->orderBy('`order`') ->fetchPairs('id', 'name'); foreach($branches as $branchID => $branchName) $branches[$branchID] = htmlspecialchars_decode($branchName); @@ -598,10 +600,10 @@ class branchModel extends model /** * Merge multiple branches into one branch. * - * @param int $productID - * @param string $mergedBranches + * @param int $productID + * @param string $mergedBranches * @access public - * @return int + * @return int|bool */ public function mergeBranch($productID, $mergedBranches) { @@ -609,7 +611,6 @@ class branchModel extends model /* Get the target branch. */ $targetBranch = $data->createBranch ? $this->create($productID, true) : $data->targetBranch; - if(!$targetBranch and $targetBranch != BRANCH_MAIN) return false; if($data->createBranch) $this->loadModel('action')->create('branch', $targetBranch, 'Opened'); /* Branch. */ diff --git a/module/branch/view/manage.html.php b/module/branch/view/manage.html.php index f8cda10794..7c7af2328d 100644 --- a/module/branch/view/manage.html.php +++ b/module/branch/view/manage.html.php @@ -15,6 +15,7 @@ branch);?> + @@ -78,7 +79,7 @@ ';?> - + name;?>  default) @@ -126,7 +127,7 @@ createLink('branch', 'batchEdit', "productID=$productID"); echo html::submitButton($lang->edit, "data-form-action='$batchEditLink'", 'btn'); - if($browseType != 'closed') echo html::a('#mergeBranch', $lang->branch->merge, '', "data-toggle='modal' class='btn'"); + if(($browseType != 'closed' and common::hasPriv('branch', 'mergeBranch'))) echo html::a('#mergeBranch', $lang->branch->merge, '', "data-toggle='modal' class='btn' id='merge'"); ?>
@@ -143,14 +144,22 @@ diff --git a/module/kanban/view/view.html.php b/module/kanban/view/view.html.php index 9ade93870f..01a5ebb44b 100644 --- a/module/kanban/view/view.html.php +++ b/module/kanban/view/view.html.php @@ -51,7 +51,7 @@ $canCreateLane = commonModel::hasPriv('kanban', 'createLane'); name;?> - + - + archived):?> diff --git a/module/kanban/view/viewarchivedcard.html.php b/module/kanban/view/viewarchivedcard.html.php index 2e7133dac4..9dbf290225 100644 --- a/module/kanban/view/viewarchivedcard.html.php +++ b/module/kanban/view/viewarchivedcard.html.php @@ -23,10 +23,20 @@ #archivedCards .card-actions {position: relative; padding: 15px 10px; padding-top: 0px;} #archivedCards .card-actions > .btn {display: block;} #archivedCards .card-actions > .btn + .btn {margin-top: 10px;} +#archivedCards .info > .time {background-color: rgba(0, 0, 0, 0.15);} #archivedCards .info > .users > span:before {left: -4px;} #archivedCards .info > .users > span:after {right: -4px;} #archivedCards .info > .users .avatar {display: inline-block; position: relative; border-radius: 50%; top: -5px; margin: 5px; right: -7px; margin-left: -4px;} #archivedCards .cardName {word-wrap: break-word;} +#archivedCards .card-item .red {background-color: #b10b0b;} +#archivedCards .card-item .yellow {background-color: #cfa227;} +#archivedCards .card-item .green {background-color: #2a5f29;} +#archivedCards .card-item .has-color .cardName, +#archivedCards .card-item .has-color .actions .icon-more-v, +#archivedCards .card-item .has-color .info > .label-pri, +#archivedCards .card-item .has-color .info > .estimate, +#archivedCards .card-item .has-color .info > .label-light {color: #FFFFFF;} +#archivedCards .card-item .has-color .info > .label-pri {border-color: #FFFFFF;}
@@ -37,7 +47,13 @@
-
+ color == '#b10b0b') $color = 'has-color red'; + if($card->color == '#cfa227') $color = 'has-color yellow'; + if($card->color == '#2a5f29') $color = 'has-color green'; + ?> +
createLink('kanban', 'viewCard', "cardID=$card->id", '', true), $card->name, '', "class='cardName iframe' data-toggle='modal' data-width='80%' title='$card->name'");?>
pri;?> diff --git a/module/kanban/view/viewcard.html.php b/module/kanban/view/viewcard.html.php index 3c401d32d2..35a3f42fbf 100644 --- a/module/kanban/view/viewcard.html.php +++ b/module/kanban/view/viewcard.html.php @@ -36,10 +36,13 @@
deleted):?> id", "{$lang->kanbancard->assign}", '', "class='btn btn-link iframe' title='{$lang->kanbancard->assign}'", true, true); - common::printLink('kanban', 'archiveCard', "cardID=$card->id", "{$lang->kanbancard->archive}", 'hiddenwin', "class='btn btn-link' title='{$lang->kanbancard->archive}'", true, true); + //common::printLink('kanban', 'assigntoCard', "cardID=$card->id", "{$lang->kanbancard->assign}", '', "class='btn btn-link iframe' title='{$lang->kanbancard->assign}'", true, true); + if(!$card->archived) + { + common::printLink('kanban', 'archiveCard', "cardID=$card->id", "{$lang->kanbancard->archive}", 'hiddenwin', "class='btn btn-link' title='{$lang->kanbancard->archive}'", true, true); - echo "
"; + echo "
"; + } common::printLink('kanban', 'editCard', "cardID=$card->id", '', '', "class='btn btn-link iframe' data-width='80%' title='{$lang->kanbancard->edit}'", true, true); common::printLink('kanban', 'copyCard', "cardID=$card->id", '', '', "class='btn btn-link iframe' title='{$lang->kanbancard->copy}'", true, true); diff --git a/module/product/control.php b/module/product/control.php index f60cc1a0bd..ae6a2ff614 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -254,7 +254,7 @@ class product extends control } /* Process the sql, get the conditon partion, save it to session. */ - $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', $browseType != 'bysearch' && $this->app->rawModule != 'projectstory'); + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', ($browseType != 'bysearch' and $browseType != 'reviewbyme' and $this->app->rawModule != 'projectstory')); if(!empty($stories)) $stories = $this->story->mergeReviewer($stories); diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 675d5301f2..abbfb064b7 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -115,7 +115,7 @@ ?> session->currentProductType != 'normal'):?> - parent != '-1') echo $branchOption[$plan->branch];?> + parent != '-1') echo $branchOption[$plan->branch];?> begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?> end == '2030-01-01' ? $lang->productplan->future : $plan->end;?> diff --git a/module/story/control.php b/module/story/control.php index a8a00808d7..aa00d7b601 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -489,7 +489,7 @@ class story extends control } $this->view->titles = $titles; } - $plans = $this->loadModel('productplan')->getPairsForStory($productID, $branch === 'all' or !in_array($branch, array_keys($branches)) ? 0 : $branch, 'skipParent|unexpired'); + $plans = $this->loadModel('productplan')->getPairsForStory($productID, ($branch === 'all' or !in_array($branch, array_keys($branches))) ? 0 : $branch, 'skipParent|unexpired'); $plans['ditto'] = $this->lang->story->ditto; $priList = (array)$this->lang->story->priList;