* code for task #2552.

This commit is contained in:
Catouse
2016-04-18 16:35:50 +08:00
parent 53a390dd0a
commit ba2eff3f57
9 changed files with 228 additions and 1 deletions
+18
View File
@@ -979,6 +979,24 @@ class taskModel extends model
->fetchPairs();
}
/**
* Get tasks a story.
*
* @param int $storyID
* @param int $projectID
* @access public
* @return array
*/
public function getStoryTasks($storyID, $projectID = 0)
{
return $this->dao->select('*')
->from(TABLE_TASK)
->where('story')->eq((int)$storyID)
->andWhere('deleted')->eq(0)
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->fetchAll();
}
/**
* Get counts of some stories' tasks.
*