diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index cfe989510d..36d9fe8767 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -322,7 +322,8 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
createLink('story', 'batchEdit', "productID=$productID&projectID=0&branch=$branch&storyType=$storyType");
+ $projectID = $isProjectStory ? $this->session->project : 0;
+ $actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=$projectID&branch=$branch&storyType=$storyType");
?>
edit, "data-form-action='$actionLink' $disabled");?>
diff --git a/module/story/control.php b/module/story/control.php
index 7fe536dca2..04a2fac94a 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -626,6 +626,27 @@ class story extends control
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$this->story->replaceURLang($storyType);
+ if($this->app->openApp == 'product')
+ {
+ $this->product->setMenu($productID);
+ }
+ else if($this->app->openApp == 'project')
+ {
+ $this->project->setMenu($executionID);
+ }
+ else if($this->app->openApp == 'execution')
+ {
+ $this->execution->setMenu($executionID);
+ }
+ else if($this->app->openApp == 'qa')
+ {
+ $this->loadModel('qa')->setMenu('', $productID);
+ }
+ else if($this->app->openApp == 'my')
+ {
+ $this->loadModel('my')->setMenu();
+ }
+
/* Load model. */
$this->loadModel('productplan');
@@ -655,7 +676,6 @@ class story extends control
/* The stories of a product. */
if($productID)
{
- $this->product->setMenu($productID, $branch);
$product = $this->product->getByID($productID);
$branchProduct = $product->type == 'normal' ? false : true;
@@ -674,7 +694,6 @@ class story extends control
elseif($executionID)
{
/* The stories of a execution. */
- $this->execution->setMenu($executionID);
$execution = $this->execution->getByID($executionID);
$branchProduct = false;
@@ -694,9 +713,6 @@ class story extends control
}
else
{
- /* The stories of my. */
- $this->loadModel('my')->setMenu();
-
$branchProduct = false;
$productIdList = array();
foreach($stories as $story) $productIdList[$story->product] = $story->product;
@@ -748,6 +764,7 @@ class story extends control
$this->view->storyType = $storyType;
$this->view->stories = $stories;
$this->view->productName = isset($product) ? $product->name : '';
+ $this->view->executionID = $executionID;
$this->display();
}
diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php
index 1cbef6ed59..10b8579769 100644
--- a/module/story/view/batchedit.html.php
+++ b/module/story/view/batchedit.html.php
@@ -35,12 +35,12 @@ foreach(explode(',', $showFields) as $field)
if($field)$visibleFields[$field] = '';
}
?>
-