From 2af11bc06719932f531f25d837a50f79d68bbf0a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 26 Aug 2014 06:54:09 +0000 Subject: [PATCH] * fix bug #622. --- module/story/model.php | 8 ++++---- module/testcase/js/batchcreate.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index fb7a0094c6..1a3116f463 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -872,7 +872,7 @@ class storyModel extends model ->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id') ->where('t1.product')->in($productID) ->beginIF(!empty($moduleIds))->andWhere('module')->in($moduleIds)->fi() - ->beginIF($status != 'all')->andWhere('status')->in($status)->fi() + ->beginIF($status and $status != 'all')->andWhere('status')->in($status)->fi() ->andWhere('t1.deleted')->eq(0) ->orderBy($orderBy)->page($pager)->fetchAll(); } @@ -894,7 +894,7 @@ class storyModel extends model ->where('1=1') ->beginIF($productID)->andWhere('t1.product')->in($productID)->fi() ->beginIF($moduleIds)->andWhere('t1.module')->in($moduleIds)->fi() - ->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi() + ->beginIF($status and $status != 'all')->andWhere('t1.status')->in($status)->fi() ->andWhere('t1.deleted')->eq(0) ->orderBy($order) ->fetchAll(); @@ -1172,7 +1172,7 @@ class storyModel extends model { $stories = $this->dao->select('*')->from(TABLE_STORY) ->where('plan')->eq((int)$planID) - ->beginIF($status != 'all')->andWhere('status')->in($status)->fi() + ->beginIF($status and $status != 'all')->andWhere('status')->in($status)->fi() ->andWhere('deleted')->eq(0) ->orderBy($orderBy)->page($pager)->fetchAll('id'); @@ -1195,7 +1195,7 @@ class storyModel extends model { return $this->dao->select('*')->from(TABLE_STORY) ->where('plan')->eq($planID) - ->beginIF($status != 'all')->andWhere('status')->in($status)->fi() + ->beginIF($status and $status != 'all')->andWhere('status')->in($status)->fi() ->andWhere('deleted')->eq(0) ->fetchAll(); } diff --git a/module/testcase/js/batchcreate.js b/module/testcase/js/batchcreate.js index 7f9551d5ff..7903f00900 100755 --- a/module/testcase/js/batchcreate.js +++ b/module/testcase/js/batchcreate.js @@ -19,7 +19,7 @@ $(document).ready(function() } } } - link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&moduleID=' + module + '&storyID='+ $(this).val() + '&onlyOption=true'); + link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&moduleID=' + module + '&storyID='+ $(this).val() + '&onlyOption=true&status=noclosed'); $('#story' + index).load(link, function(){$(this).trigger("chosen:updated");}); } if($(select).val() == 'same')