From 54afa9bce1d18e5ce72e4f77f580d1e486fd9931 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 11 Dec 2017 14:37:00 +0800 Subject: [PATCH] * fix bug. --- module/product/view/browse.html.php | 4 ++-- module/project/model.php | 1 + module/task/model.php | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index e5925183ab..b920baa3e2 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -32,7 +32,7 @@ moduleName, $this->methodName) as $menuItem):?> hidden)) continue;?> - name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name;?> + name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name;?> name, 'QUERY') === 0 ? '¶m=' . (int)substr($menuItem->name, 5) : '';?> name == 'my'):?> '; ?> -
  • inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType" . $param), $menuItem->text);?>
  • +
  • inlink('browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType" . $param), $menuItem->text);?>
  • product->searchStory;?>
  • diff --git a/module/project/model.php b/module/project/model.php index e947495283..2ba24b764c 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1636,6 +1636,7 @@ class projectModel extends model ->from(TABLE_TASK) ->where('project')->in(array_keys($projects)) ->andWhere('deleted')->eq('0') + ->andWhere('parent')->eq('0') ->andWhere('status')->notin('cancel,closed') ->groupBy('project') ->fetchAll(); diff --git a/module/task/model.php b/module/task/model.php index 161909c879..938f35099b 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -153,14 +153,18 @@ class taskModel extends model $storyIDs = array(); $taskNames = array(); + $preStory = 0; foreach($tasks->story as $key => $storyID) { if(empty($tasks->name[$key])) continue; if($tasks->type[$key] == 'affair') continue; if($tasks->type[$key] == 'ditto' && isset($tasks->type[$key - 1]) && $tasks->type[$key - 1] == 'affair') continue; + if($storyID == 'ditto') $storyID = $preStory; + $preStory = $storyID; + $inNames = in_array($tasks->name[$key], $taskNames); - if(!$inNames || $inNames && !in_array($storyID, $storyIDs)) + if(!$inNames || ($inNames && !in_array($storyID, $storyIDs))) { $storyIDs[] = $storyID; $taskNames[] = $tasks->name[$key];