diff --git a/module/report/model.php b/module/report/model.php index 4e2f16bb0f..b6ff30b900 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -726,6 +726,7 @@ class reportModel extends model ->orWhere('RD')->in($accounts) ->markRight(1) ->fi() + ->andWhere('shadow')->eq(0) ->fetchAll('id'); /* Get created plans in this year. */ @@ -733,6 +734,7 @@ class reportModel extends model ->leftJoin(TABLE_ACTION)->alias('t2')->on("t1.id=t2.objectID and t2.objectType='productplan'") ->where('LEFT(t2.date, 4)')->eq($year) ->andWhere('t1.deleted')->eq(0) + ->andWhere('t1.product')->in(array_keys($products)) ->beginIF($accounts) ->andWhere('t2.actor')->in($accounts) ->fi() @@ -750,11 +752,13 @@ class reportModel extends model $createStoryProducts = $this->dao->select('DISTINCT product')->from(TABLE_STORY) ->where('LEFT(openedDate, 4)')->eq($year) ->andWhere('deleted')->eq(0) + ->andWhere('product')->in(array_keys($products)) ->beginIF($accounts)->andWhere('openedBy')->in($accounts)->fi() ->fetchPairs('product', 'product'); $closeStoryProducts = $this->dao->select('DISTINCT product')->from(TABLE_STORY) ->where('LEFT(closedDate, 4)')->eq($year) ->andWhere('deleted')->eq(0) + ->andWhere('product')->in(array_keys($products)) ->beginIF($accounts)->andWhere('closedBy')->in($accounts)->fi() ->fetchPairs('product', 'product'); if($createStoryProducts or $closeStoryProducts) diff --git a/module/story/control.php b/module/story/control.php index 1f16da235e..bf6a2ef71d 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -2714,7 +2714,7 @@ class story extends control $this->story->replaceURLang($storyType); $this->products = $this->product->getPairs('', 0, '', 'all'); - if($this->app->tab == 'project') + if(strpos('project,execution', $this->app->tab) !== false) { $project = $this->dao->findByID($projectID)->from(TABLE_PROJECT)->fetch(); if($project->type == 'project') @@ -2727,10 +2727,11 @@ class story extends control $this->loadModel('execution')->setMenu($projectID); } - if(!$project->hasProduct and !$project->multiple) + if(!$project->hasProduct) { unset($this->lang->story->report->charts['storysPerProduct']); - unset($this->lang->story->report->charts['storysPerPlan']); + + if(!$project->multiple) unset($this->lang->story->report->charts['storysPerPlan']); } } else diff --git a/module/story/css/batchclose.css b/module/story/css/batchclose.css index 680e3638d9..576dfc65bd 100644 --- a/module/story/css/batchclose.css +++ b/module/story/css/batchclose.css @@ -1,5 +1,5 @@ .c-id {width: 50px;} -.c-reason {width: 150px;} +.c-reason {width: 210px;} td[id^="duplicateStoryBox"].required:after {top: 6px; right: 2px;} td[id^="duplicateStoryBox"] {overflow: visible;} td.reasons-td {overflow: visible;} diff --git a/module/story/js/batchclose.js b/module/story/js/batchclose.js index bd33321844..7c15a5c040 100755 --- a/module/story/js/batchclose.js +++ b/module/story/js/batchclose.js @@ -12,22 +12,16 @@ function setDuplicateAndChild(resolution, storyID) { $('#childStoryBox' + storyID).hide(); $('#duplicateStoryBox' + storyID).show(); - $('#duplicateStoryTitle').show(); - $('.form-actions').attr('colspan', 6); } else if(resolution == 'subdivided') { $('#duplicateStoryBox' + storyID).hide(); $('#childStoryBox' + storyID).show(); - $('#duplicateStoryTitle').hide(); - $('.form-actions').attr('colspan', 5); } else { $('#duplicateStoryBox' + storyID).hide(); $('#childStoryBox' + storyID).hide(); - $('#duplicateStoryTitle').hide(); - $('.form-actions').attr('colspan', 5); } } diff --git a/module/story/model.php b/module/story/model.php index 1034178962..81a760f001 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4944,6 +4944,9 @@ class storyModel extends model case 'assignedDate': echo helper::isZeroDate($story->assignedDate) ? '' : substr($story->assignedDate, 5, 11); break; + case 'activatedDate': + echo helper::isZeroDate($story->activatedDate) ? '' : substr($story->activatedDate, 5, 11); + break; case 'reviewedBy': echo $story->reviewedBy; break; diff --git a/module/story/view/batchclose.html.php b/module/story/view/batchclose.html.php index be938128d6..21cf183703 100755 --- a/module/story/view/batchclose.html.php +++ b/module/story/view/batchclose.html.php @@ -28,7 +28,6 @@