diff --git a/module/action/model.php b/module/action/model.php index 45153af3df..0239ec5dc0 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -330,12 +330,20 @@ class actionModel extends model ->where("objectType IN('project', 'testtask', 'build')") ->andWhere('project')->eq((int)$objectID) ->fi() + ->beginIF($objectType == 'story') + ->where('objectType')->in('story,requirement') + ->andWhere('objectID')->eq((int)$objectID) + ->fi() + ->beginIF($objectType == 'case') + ->where('objectType')->in('case,testcase') + ->andWhere('objectID')->eq((int)$objectID) + ->fi() ->beginIF($objectType == 'module') ->where('objectType')->eq($objectType) ->andWhere('((action')->ne('deleted')->andWhere('objectID')->eq((int)$objectID)->markRight(1) ->orWhere('(action')->eq('deleted')->andWhere('objectID')->in($modules)->markRight(1)->markRight(1) ->fi() - ->beginIF($objectType != 'project' and $objectType != 'module') + ->beginIF(strpos('project,case,story,module', $objectType) === false) ->where('objectType')->eq($objectType) ->andWhere('objectID')->eq((int)$objectID) ->fi()