Permalink
Browse files

fixed bug with task events showing up in wrong projects

  • Loading branch information...
kluther committed Dec 2, 2011
1 parent e324d9c commit 377da444b8df1597b9b2b0d32d613664ff8ebbf0
Showing with 3 additions and 2 deletions.
  1. +3 −2 model/classes/event.class.php
@@ -191,8 +191,9 @@ public static function getTaskEvents($taskID=null, $limit=null) {
$query = "SELECT e.id AS id FROM ".self::DB_TABLE." e";
$query .= " INNER JOIN ".EventType::DB_TABLE." et ON ";
- $query .= " e.event_type_id = et.id";
- $query .= " WHERE (e.item_1_id = ".$taskID;
+ $query .= " e.event_type_id = et.id";
+ $query .= " WHERE e.project_id = ".$task->getProjectID();
+ $query .= " AND (e.item_1_id = ".$taskID;
$query .= " AND e.event_type_id IN (";
$query .= " SELECT id FROM ".EventType::DB_TABLE;
$query .= " WHERE `group` = ".TASKS_ID;

0 comments on commit 377da44

Please sign in to comment.