diff --git a/Makefile b/Makefile
index 9f8a28d0a1..cc8fefd074 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/db/update18.0.beta1.sql b/db/update18.0.beta1.sql
index 4c8c909760..038173600a 100644
--- a/db/update18.0.beta1.sql
+++ b/db/update18.0.beta1.sql
@@ -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`;
diff --git a/module/bug/control.php b/module/bug/control.php
index 96ea49c4bf..a4b7127e33 100755
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -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')
diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js
index 0cc3ce246d..5c32f9e35b 100644
--- a/module/bug/js/browse.js
+++ b/module/bug/js/browse.js
@@ -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()
diff --git a/module/bug/js/common.js b/module/bug/js/common.js
index 7134ecab5b..81920153b2 100644
--- a/module/bug/js/common.js
+++ b/module/bug/js/common.js
@@ -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)
+}
diff --git a/module/build/css/view.css b/module/build/css/view.css
index 0789a2c0c3..baaa980afa 100644
--- a/module/build/css/view.css
+++ b/module/build/css/view.css
@@ -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;}
diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php
index 036a9518f5..9ccf26e647 100644
--- a/module/build/view/view.html.php
+++ b/module/build/view/view.html.php
@@ -88,15 +88,15 @@ tbody tr td:first-child input {display: none;}
idAB);?>
-
pri;?>>priAB);?> |
story->title);?> |
+ pri;?>>priAB);?> |
+ statusAB);?> |
build->linkedBuild;?> |
- openedByAB);?> |
- story->estimateAB);?> |
- statusAB);?> |
- story->stageAB);?> |
+ openedByAB);?> |
+ story->estimateAB);?> |
+ story->stageAB);?> |
actions?> |
@@ -125,11 +125,6 @@ tbody tr td:first-child input {display: none;}
id);?>
-
- pri):?>
- story->priList, $story->pri, $story->pri);?>
-
- |
parent > 0) echo "{$lang->story->childrenAB}";
@@ -147,17 +142,20 @@ tbody tr td:first-child input {display: none;}
}
?>
|
+
+ pri):?>
+ story->priList, $story->pri, $story->pri);?>
+
+ |
+
+ processStatus('story', $story);?>
+ |
|
openedBy);?> |
- estimate . $config->hourUnit;?> |
-
-
- processStatus('story', $story);?>
-
- |
- story->stageList[$story->stage];?> |
+ estimate . $config->hourUnit;?> |
+ story->stageList[$story->stage];?> |
idAB);?>
- | bug->title);?> |
- bug->status);?> |
+ bug->title);?> |
+ bug->status);?> |
- build->linkedBuild?> |
+ build->linkedBuild?> |
openedByAB);?> |
bug->openedDateAB);?> |
- bug->resolvedByAB);?> |
+ bug->resolvedBy);?> |
bug->resolvedDateAB);?> |
actions?> |
@@ -254,7 +252,7 @@ tbody tr td:first-child input {display: none;}
- |
+ |
openedBy);?> |
openedDate) ? '' : substr($bug->openedDate, 5, 11);?> |
@@ -297,14 +295,14 @@ tbody tr td:first-child input {display: none;}
id}&type=generatedBug&link=$link¶m=$param&orderBy=%s";?>
- | idAB);?> |
- bug->severity;?>>bug->severityAB);?> |
- bug->title);?> |
- bug->status);?> |
- bug->openedBuild;?> |
+ idAB);?> |
+ bug->title);?> |
+ bug->severity;?>>bug->severityAB);?> |
+ bug->status);?> |
+ bug->openedBuild;?> |
openedByAB);?> |
bug->openedDateAB);?> |
- bug->resolvedByAB);?> |
+ bug->resolvedBy);?> |
bug->resolvedDateAB);?> |
@@ -324,6 +322,9 @@ tbody tr td:first-child input {display: none;}
createLink('bug', 'view', "bugID=$bug->id", '', true);?>
| id);?> |
+
+ title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");?>
+ |
bug->severityList, $bug->severity, $bug->severity);?>
@@ -331,9 +332,6 @@ tbody tr td:first-child input {display: none;}
|
-
- title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");?>
- |
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, '')) . ' ';
?>
- | |
+ |
openedBy);?> |
openedDate) ? '' : substr($bug->openedDate, 5, 11);?> |
resolvedBy);?> |
diff --git a/module/dept/model.php b/module/dept/model.php
index 7fd5752c90..fa432bda96 100644
--- a/module/dept/model.php
+++ b/module/dept/model.php
@@ -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
*/
diff --git a/module/execution/control.php b/module/execution/control.php
index 0e3a109c25..5379ec4ddb 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -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();
}
diff --git a/module/execution/css/story.css b/module/execution/css/story.css
index e0333312b2..2eff8dd035 100644
--- a/module/execution/css/story.css
+++ b/module/execution/css/story.css
@@ -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}
\ No newline at end of file
diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php
index e325edbcdc..1aad7582a6 100644
--- a/module/execution/lang/de.php
+++ b/module/execution/lang/de.php
@@ -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.";
\ No newline at end of file
diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php
index d273799d4b..412c0c9f74 100644
--- a/module/execution/lang/en.php
+++ b/module/execution/lang/en.php
@@ -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.";
\ No newline at end of file
diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php
index a107beff48..4e87634ef9 100644
--- a/module/execution/lang/fr.php
+++ b/module/execution/lang/fr.php
@@ -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.";
\ No newline at end of file
diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php
index 48db681691..320385aef4 100644
--- a/module/execution/lang/zh-cn.php
+++ b/module/execution/lang/zh-cn.php
@@ -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 = "执行按计划关联需求时,只导入激活状态的需求。";
\ No newline at end of file
diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php
index 6ca7343939..bb35137bae 100644
--- a/module/execution/view/story.html.php
+++ b/module/execution/view/story.html.php
@@ -402,7 +402,10 @@
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index 0f1bca679b..58c6ed239a 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -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';
diff --git a/module/holiday/model.php b/module/holiday/model.php
index cfffe7ff23..2b4a05d0f3 100644
--- a/module/holiday/model.php
+++ b/module/holiday/model.php
@@ -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
*/
diff --git a/module/product/control.php b/module/product/control.php
index 4045f5c654..385e17f7e9 100755
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -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);
diff --git a/module/product/css/browse.css b/module/product/css/browse.css
index 686cbd21c5..75f034788f 100644
--- a/module/product/css/browse.css
+++ b/module/product/css/browse.css
@@ -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}
\ No newline at end of file
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index dffefb71c9..f6440c871c 100755
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -620,7 +620,11 @@ js::set('vision', $this->config->vision);
diff --git a/module/productplan/css/view.css b/module/productplan/css/view.css
index cffbb1ac2d..b924713e90 100644
--- a/module/productplan/css/view.css
+++ b/module/productplan/css/view.css
@@ -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;}
diff --git a/module/productplan/js/create.js b/module/productplan/js/create.js
index dc43f76277..b7c4c8ae53 100644
--- a/module/productplan/js/create.js
+++ b/module/productplan/js/create.js
@@ -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)
diff --git a/module/productplan/js/edit.js b/module/productplan/js/edit.js
index 9d3733f176..4d4a4db832 100644
--- a/module/productplan/js/edit.js
+++ b/module/productplan/js/edit.js
@@ -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)
diff --git a/module/productplan/lang/de.php b/module/productplan/lang/de.php
index e418f42088..1e77f9e257 100644
--- a/module/productplan/lang/de.php
+++ b/module/productplan/lang/de.php
@@ -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';
diff --git a/module/productplan/lang/en.php b/module/productplan/lang/en.php
index 86a0808f04..65233b5eb2 100644
--- a/module/productplan/lang/en.php
+++ b/module/productplan/lang/en.php
@@ -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';
diff --git a/module/productplan/lang/fr.php b/module/productplan/lang/fr.php
index ad1e414469..263bb511a7 100644
--- a/module/productplan/lang/fr.php
+++ b/module/productplan/lang/fr.php
@@ -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';
diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php
index aee350b57a..b756ef52d2 100644
--- a/module/productplan/lang/zh-cn.php
+++ b/module/productplan/lang/zh-cn.php
@@ -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'] = '未完成';
diff --git a/module/productplan/model.php b/module/productplan/model.php
index dbb8372e66..c063da4ec4 100644
--- a/module/productplan/model.php
+++ b/module/productplan/model.php
@@ -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);
diff --git a/module/productplan/view/edit.html.php b/module/productplan/view/edit.html.php
index 81ffe5e5b2..0f783196c1 100644
--- a/module/productplan/view/edit.html.php
+++ b/module/productplan/view/edit.html.php
@@ -40,7 +40,7 @@
'') + $parentPlanPairs, $plan->parent, "class='form-control chosen'");?>
|
- shadow and $product->type != 'normal' and $plan->parent != '-1'):?>
+ shadow and $product->type != 'normal'):?>
| product->branch;?> |
branch, "class='form-control chosen' multiple");?> | | |
diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php
index 4c91630e9c..d01f599e3b 100644
--- a/module/productplan/view/view.html.php
+++ b/module/productplan/view/view.html.php
@@ -124,8 +124,8 @@
idAB);?>
|
- priAB);?> |
story->title);?> |
+ priAB);?> |
statusAB);?> |
@@ -139,15 +139,15 @@
| productplan->updateOrder);?> |
- priAB);?> |
- story->module);?> |
- story->title);?> |
- openedByAB);?> |
- assignedToAB);?> |
- story->estimateAB);?> |
- statusAB);?> |
- story->stageAB);?> |
- actions?> |
+ story->title);?> |
+ story->module);?> |
+ priAB);?> |
+ statusAB);?> |
+ openedByAB);?> |
+ assignedToAB);?> |
+ story->estimateAB);?> |
+ story->stageAB);?> |
+ actions?> |
@@ -165,13 +165,13 @@
id);?>
|
- " title='story->priList, $story->pri);?>'>story->priList, $story->pri);?> |
parent > 0) echo "story->children}>{$lang->story->childrenAB}";
echo $story->title;
?>
|
+ " title='story->priList, $story->pri);?>'>story->priList, $story->pri);?> |
processStatus('story', $story);?>
@@ -186,22 +186,20 @@
|
|
- " title='story->priList, $story->pri);?>'>story->priList, $story->pri);?> |
- '>module, '');?> |
parent > 0) echo "story->children}>{$lang->story->childrenAB}";
echo html::a($viewLink , $story->title, '', "style='color: $story->color' data-app={$this->app->tab}");
?>
|
+ '>module, '');?> |
+ " title='story->priList, $story->pri);?>'>story->priList, $story->pri);?> |
+
+ processStatus('story', $story);?>
+ |
openedBy);?> |
assignedTo);?> |
estimate . $config->hourUnit;?> |
-
-
- processStatus('story', $story);?>
-
- |
story->stageList[$story->stage];?> |
idAB);?>
- | priAB);?> |
bug->title);?> |
+ priAB);?> |
bug->status);?> |
@@ -431,12 +429,12 @@
idAB);?>
|
- priAB);?> |
- bug->title);?> |
+ bug->title);?> |
+ priAB);?> |
+ bug->status);?> |
openedByAB);?> |
bug->assignedToAB);?> |
- bug->status);?> |
- actions?> |
+ actions?> |
@@ -447,12 +445,10 @@
id);?>
|
- bug->priList, $bug->pri);?> |
title?> |
+ bug->priList, $bug->pri);?> |
-
- processStatus('bug', $bug);?>
-
+ processStatus('bug', $bug);?>
|
@@ -462,15 +458,13 @@
id);?>
|
- bug->priList, $bug->pri);?> |
createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', "data-app={$this->app->tab}");?> |
+ bug->priList, $bug->pri);?> |
+
+ processStatus('bug', $bug);?>
+ |
openedBy);?> |
assignedTo);?> |
-
-
- processStatus('bug', $bug);?>
-
- |
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.";
\ No newline at end of file
diff --git a/module/project/lang/en.php b/module/project/lang/en.php
index 0aa80f04b9..291bff2889 100644
--- a/module/project/lang/en.php
+++ b/module/project/lang/en.php
@@ -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.";
\ No newline at end of file
diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php
index 0399d48ed2..55285fa342 100644
--- a/module/project/lang/fr.php
+++ b/module/project/lang/fr.php
@@ -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.";
\ No newline at end of file
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index c0f24e413a..b7dfef7811 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -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 = "项目按计划关联需求时,只导入激活状态的需求。";
diff --git a/module/projectrelease/css/browse.css b/module/projectrelease/css/browse.css
index f9c5e49f9e..a8711505bd 100644
--- a/module/projectrelease/css/browse.css
+++ b/module/projectrelease/css/browse.css
@@ -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;}
diff --git a/module/projectrelease/css/view.css b/module/projectrelease/css/view.css
index a35a23f770..b229853430 100644
--- a/module/projectrelease/css/view.css
+++ b/module/projectrelease/css/view.css
@@ -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;}
diff --git a/module/projectrelease/view/view.html.php b/module/projectrelease/view/view.html.php
index d8c5b7d6cd..7475a422a2 100644
--- a/module/projectrelease/view/view.html.php
+++ b/module/projectrelease/view/view.html.php
@@ -60,7 +60,7 @@
?>
id}&type=story&link=$link¶m=$param&orderBy=%s";?>
-
+
|
@@ -69,17 +69,17 @@
idAB);?>
|
+ story->title);?> |
priAB);?> |
- story->title);?> |
- build->linkedBuild;?> |
- openedByAB);?> |
- story->estimateAB);?> |
- statusAB);?> |
- story->stageAB);?> |
+ statusAB);?> |
+ build->linkedBuild;?> |
+ openedByAB);?> |
+ story->estimateAB);?> |
+ story->stageAB);?> |
actions?> |
- |
+
$story):?>
createLink('story', 'view', "storyID=$story->id&version=0¶m={$this->session->project}", '', true);?>
@@ -92,20 +92,20 @@
id);?>
- | pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
parent > 0) echo "{$lang->story->childrenAB}";
echo html::a($storyLink,$story->title, '', "class='preview'");
?>
|
- buildName?> |
- openedBy);?> |
- estimate . $config->hourUnit;?> |
+ pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
processStatus('story', $story);?>
|
- story->stageList[$story->stage];?> |
+ buildName?> |
+ openedBy);?> |
+ estimate . $config->hourUnit;?> |
+ story->stageList[$story->stage];?> |
idAB);?>
- | bug->title);?> |
- bug->status);?> |
- bug->resolvedBuild;?> |
+ bug->title);?> |
+ bug->status);?> |
+ bug->resolvedBuild;?> |
openedByAB);?> |
- bug->openedDateAB);?> |
- bug->resolvedByAB);?> |
- bug->resolvedDateAB);?> |
- actions;?> |
+ bug->openedDateAB);?> |
+ bug->resolvedBy);?> |
+ bug->resolvedDateAB);?> |
+ actions;?> |
@@ -259,13 +259,13 @@
idAB);?>
+ bug->title);?> |
bug->severity;?>>bug->severityAB);?> |
- bug->title);?> |
- bug->status);?> |
- bug->openedBuild;?> |
- openedByAB);?> |
- bug->openedDateAB);?> |
- actions;?> |
+ bug->status);?> |
+ bug->openedBuild;?> |
+ openedByAB);?> |
+ bug->openedDateAB);?> |
+ actions;?> |
id);?>
+ title, '', "class='preview'");?> |
' title='bug->severityList, $bug->severity);?>' data-severity='severity;?>'>bug->severityList, $bug->severity, $bug->severity);?>
@@ -299,7 +300,6 @@
|
- title, '', "class='preview'");?> |
processStatus('bug', $bug);?> |
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;}
diff --git a/module/release/css/view.css b/module/release/css/view.css
index acc96a13fd..ecdd28df04 100644
--- a/module/release/css/view.css
+++ b/module/release/css/view.css
@@ -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;}
diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php
index 2f0fe5bf04..293bc3d711 100644
--- a/module/release/view/browse.html.php
+++ b/module/release/view/browse.html.php
@@ -87,7 +87,7 @@
?>
-
+ | '>
type != 'normal'):?>
branchName;?>
diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php
index 63c2073a51..4e080fce23 100644
--- a/module/release/view/view.html.php
+++ b/module/release/view/view.html.php
@@ -62,7 +62,7 @@
?>
id}&type=story&link=$link¶m=$param&orderBy=%s";?>
-
+
|
@@ -71,17 +71,17 @@
idAB);?>
|
+ story->title);?> |
pri;?>>priAB);?> |
- story->title);?> |
- build->linkedBuild;?> |
- openedByAB);?> |
- story->estimateAB);?> |
- statusAB);?> |
- story->stageAB);?> |
+ statusAB);?> |
+ build->linkedBuild;?> |
+ openedByAB);?> |
+ story->estimateAB);?> |
+ story->stageAB);?> |
actions?> |
- |
+
$story):?>
createLink('story', 'view', "storyID=$story->id", '', true);?>
@@ -94,20 +94,20 @@
id);?>
- | pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
parent > 0) echo "{$lang->story->childrenAB}";
echo html::a($storyLink,$story->title, '', "class='preview'");
?>
|
- buildName?> |
- openedBy);?> |
- estimate . $config->hourUnit;?> |
-
+ | pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
+
processStatus('story', $story);?>
|
- story->stageList[$story->stage];?> |
+ buildName?> |
+ openedBy);?> |
+ estimate . $config->hourUnit;?> |
+ story->stageList[$story->stage];?> |
idAB);?>
- | bug->title);?> |
- bug->status);?> |
- bug->resolvedBuild;?> |
+ bug->title);?> |
+ bug->status);?> |
+ bug->resolvedBuild;?> |
openedByAB);?> |
- bug->openedDateAB);?> |
- bug->resolvedByAB);?> |
- bug->resolvedDateAB);?> |
- actions;?> |
+ bug->openedDateAB);?> |
+ bug->resolvedBy);?> |
+ bug->resolvedDateAB);?> |
+ actions;?> |
@@ -261,13 +261,13 @@
idAB);?>
+ bug->title);?> |
bug->severity;?>>bug->severityAB);?> |
- bug->title);?> |
- bug->status);?> |
- bug->openedBuild;?> |
- openedByAB);?> |
- bug->openedDateAB);?> |
- actions;?> |
+ bug->status);?> |
+ bug->openedBuild;?> |
+ openedByAB);?> |
+ bug->openedDateAB);?> |
+ actions;?> |
id);?>
+ title, '', "class='preview'");?> |
' title='bug->severityList, $bug->severity);?>' data-severity='severity;?>'>bug->severityList, $bug->severity, $bug->severity);?>
@@ -301,7 +302,6 @@
|
- title, '', "class='preview'");?> |
processStatus('bug', $bug);?> |
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();
}
diff --git a/module/story/js/close.js b/module/story/js/close.js
index 4a8e9ffe28..b14bff76a6 100644
--- a/module/story/js/close.js
+++ b/module/story/js/close.js
@@ -24,4 +24,6 @@ $(function()
disableEmptySearch : true,
dropWidth : 'auto'
});
+
+ $('[data-toggle="popover"]').popover();
});
diff --git a/module/story/js/common.js b/module/story/js/common.js
index 40bf164e82..12d4b7e398 100644
--- a/module/story/js/common.js
+++ b/module/story/js/common.js
@@ -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: '
' + relievedTip + '
'
- });
-})
+if(typeof(relievedTip) != 'undefined')
+{
+ $('[data-toggle="popover"]').each(function(item) {
+ $index = $(this).attr('data-id');
+ $(this).popover({
+ placement: 'bottom',
+ html: true,
+ content: '
' + relievedTip + '
'
+ });
+ })
+}
+
function relieve(index)
{
diff --git a/module/story/js/edit.js b/module/story/js/edit.js
index 21116b0f48..f1f75fb8dd 100644
--- a/module/story/js/edit.js
+++ b/module/story/js/edit.js
@@ -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')
+ });
})
diff --git a/module/story/lang/de.php b/module/story/lang/de.php
index 27757b5344..0b0bd60e0d 100644
--- a/module/story/lang/de.php
+++ b/module/story/lang/de.php
@@ -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.';
\ No newline at end of file
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index ca7186698f..1e9b3386c9 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -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.';
\ No newline at end of file
diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php
index 4abae6310a..ba944e1faf 100644
--- a/module/story/lang/fr.php
+++ b/module/story/lang/fr.php
@@ -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.';
\ No newline at end of file
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index 296aadab02..24ca7c30b9 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -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 = '孪生关系解除后无法恢复,需求的关闭将不再同步。';
\ No newline at end of file
diff --git a/module/story/model.php b/module/story/model.php
index c1b8633253..69212527d0 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -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";
diff --git a/module/story/view/batchclose.html.php b/module/story/view/batchclose.html.php
index 21cf183703..41148cf959 100755
--- a/module/story/view/batchclose.html.php
+++ b/module/story/view/batchclose.html.php
@@ -34,7 +34,12 @@
$story):?>
|
- title;?> |
+
+ title;?>
+ twins)):?>
+ story->twins}:"?>
+
+ |
processStatus('story', $story);?> |
status == 'draft') unset($reasonList['cancel']);?>
diff --git a/module/story/view/close.html.php b/module/story/view/close.html.php
index 82d0a9683b..9b927c4b6c 100644
--- a/module/story/view/close.html.php
+++ b/module/story/view/close.html.php
@@ -26,14 +26,17 @@
|