diff --git a/module/story/model.php b/module/story/model.php index 7cbd5a6035..6cf5eb21b8 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3191,7 +3191,9 @@ class storyModel extends model if(!$executionID) return array(); $execution = $this->dao->findById($executionID)->from(TABLE_PROJECT)->fetch(); - $type = strtolower($type); + $orderBy = str_replace('branch_', 't2.branch_', $orderBy); + $type = strtolower($type); + if($type == 'bysearch') { $queryID = (int)$param;