diff --git a/module/action/model.php b/module/action/model.php
index dd894bec84..f3e587c268 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -853,6 +853,10 @@ class actionModel extends model
{
$desc = $this->lang->$objectType->action->rejectreviewed;
}
+ elseif($action->objectType == 'story' and $action->action == 'closed' and $action->extra === 'autoclosed')
+ {
+ $desc = $this->lang->$objectType->action->autoclosed;
+ }
elseif($action->objectType == 'productplan' and in_array($action->action, array('startedbychild','finishedbychild','closedbychild','activatedbychild', 'createchild')))
{
$desc = $this->lang->$objectType->action->changebychild;
diff --git a/module/story/lang/de.php b/module/story/lang/de.php
index b29c6e8306..d79d634096 100644
--- a/module/story/lang/de.php
+++ b/module/story/lang/de.php
@@ -320,8 +320,9 @@ $lang->story->action->reviewed = array('main' => '$date, geprüft v
$lang->story->action->rejectreviewed = array('main' => '$date, geprüft von $actor. Das Ergebnis ist $extra, Der Grund ist $reason.', 'extra' => 'reviewResultList', 'reason' => 'reasonList');
$lang->story->action->recalled = array('main' => '$date, recalled by $actor.');
$lang->story->action->closed = array('main' => '$date, geschlossen von $actor. Der Grund ist $extra $appendLink.', 'extra' => 'reasonList');
+$lang->story->action->autoclosed = array('main' => '$date, The system determines that the parent story is automatically closed because all child stories are closed.');
$lang->story->action->reviewpassed = array('main' => '$date, determined by the System. The result is Pass.');
-$lang->story->action->reviewrejected = array('main' => '$date, closed by System. The reasion is Rejection.');
+$lang->story->action->reviewrejected = array('main' => '$date, closed by System. The reason is Rejection.');
$lang->story->action->reviewclarified = array('main' => '$date, determined by the System. The result is To Be Clarified. Please re-initiate the review after edit.');
$lang->story->action->reviewreverted = array('main' => '$date, determined by the System. The result is Undo Change.');
$lang->story->action->linked2plan = array('main' => '$date, verknüpft von $actor mit Plan $extra');
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index dcefec611b..ea3885d61e 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -317,11 +317,12 @@ $lang->story->form->file = 'If any file that is linked to a story, please cl
$lang->story->action = new stdclass();
$lang->story->action->reviewed = array('main' => '$date, recorded by $actor. The result is $extra.', 'extra' => 'reviewResultList');
-$lang->story->action->rejectreviewed = array('main' => '$date, recorded by $actor. The result is $extra. The reasion is $reason.', 'extra' => 'reviewResultList', 'reason' => 'reasonList');
+$lang->story->action->rejectreviewed = array('main' => '$date, recorded by $actor. The result is $extra. The reason is $reason.', 'extra' => 'reviewResultList', 'reason' => 'reasonList');
$lang->story->action->recalled = array('main' => '$date, recalled by $actor.');
-$lang->story->action->closed = array('main' => '$date, closed by $actor. The reasion is $extra $appendLink.', 'extra' => 'reasonList');
+$lang->story->action->closed = array('main' => '$date, closed by $actor. The reason is $extra $appendLink.', 'extra' => 'reasonList');
+$lang->story->action->autoclosed = array('main' => '$date, The system determines that the parent story is automatically closed because all child stories are closed.');
$lang->story->action->reviewpassed = array('main' => '$date, determined by the System. The result is Pass.');
-$lang->story->action->reviewrejected = array('main' => '$date, closed by System. The reasion is Rejection.');
+$lang->story->action->reviewrejected = array('main' => '$date, closed by System. The reason is Rejection.');
$lang->story->action->reviewclarified = array('main' => '$date, determined by the System. The result is To Be Clarified. Please re-initiate the review after edit.');
$lang->story->action->reviewreverted = array('main' => '$date, determined by the System. The result is Undo Change.');
$lang->story->action->linked2plan = array('main' => '$date, linked by $actor to Plan $extra');
diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php
index f5d59eddae..664b8553e7 100644
--- a/module/story/lang/fr.php
+++ b/module/story/lang/fr.php
@@ -320,8 +320,9 @@ $lang->story->action->reviewed = array('main' => '$date, validée p
$lang->story->action->rejectreviewed = array('main' => '$date, validée par $actor. Le résultat est $extra. La raison est $reason.', 'extra' => 'reviewResultList', 'reason' => 'reasonList');
$lang->story->action->recalled = array('main' => '$date, recalled by $actor.');
$lang->story->action->closed = array('main' => '$date, Fermée par $actor. La raison est $extra $appendLink.', 'extra' => 'reasonList');
+$lang->story->action->autoclosed = array('main' => '$date, The system determines that the parent story is automatically closed because all child stories are closed.');
$lang->story->action->reviewpassed = array('main' => '$date, determined by the System. The result is Pass.');
-$lang->story->action->reviewrejected = array('main' => '$date, closed by System. The reasion is Rejection.');
+$lang->story->action->reviewrejected = array('main' => '$date, closed by System. The reason is Rejection.');
$lang->story->action->reviewclarified = array('main' => '$date, determined by the System. The result is To Be Clarified. Please re-initiate the review after edit.');
$lang->story->action->reviewreverted = array('main' => '$date, determined by the System. The result is Undo Change.');
$lang->story->action->linked2plan = array('main' => '$date, planifiée par $actor au Plan $extra');
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index 6c5ad0124b..d61717cc1f 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -320,6 +320,7 @@ $lang->story->action->reviewed = array('main' => '$date, 由 story->action->rejectreviewed = array('main' => '$date, 由 $actor 记录评审意见,评审意见为 $extra,原因为 $reason。', 'extra' => 'reviewResultList', 'reason' => 'reasonList');
$lang->story->action->recalled = array('main' => '$date, 由 $actor 撤销评审。');
$lang->story->action->closed = array('main' => '$date, 由 $actor 关闭,原因为 $extra $appendLink。', 'extra' => 'reasonList');
+$lang->story->action->autoclosed = array('main' => '$date, 系统判定由于关闭了所有子需求,自动关闭父需求。');
$lang->story->action->reviewpassed = array('main' => '$date, 由 系统 判定,结果为 确认通过。');
$lang->story->action->reviewrejected = array('main' => '$date, 由 系统 关闭,原因为 拒绝。');
$lang->story->action->reviewclarified = array('main' => '$date, 由 系统 判定,结果为 有待明确,请编辑后重新发起评审。');
diff --git a/module/story/model.php b/module/story/model.php
index 64ae367dc4..882ac4ab4d 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -1159,11 +1159,16 @@ class storyModel extends model
$newParentStory = $this->dao->select('*')->from(TABLE_STORY)->where('id')->eq($parentID)->fetch();
$changes = common::createChanges($oldParentStory, $newParentStory);
$action = '';
+ $extra = '';
if($status == 'active') $action = 'Activated';
- if($status == 'closed') $action = 'Closed';
+ if($status == 'closed')
+ {
+ $action = 'Closed';
+ $extra = 'autoclosed';
+ }
if($action)
{
- $actionID = $this->loadModel('action')->create('story', $parentID, $action, '', '', '', false);
+ $actionID = $this->loadModel('action')->create('story', $parentID, $action, '', $extra, '', false);
$this->action->logHistory($actionID, $changes);
}