// we need to return a nice list of changes
// we can ignore changes done by the user (they do not need emails about stuff they have done..)
// although commit messages might be usefull..???? need to work out how we can Flag that.
+ $q = DB_DataObject::factory('mtrack_change');
+
+ $conds = array(); // list of 'OR' conditions
+ foreach($ar as $kv) {
+ list($table,$id) = explode(':', $kv);
+ switch($table) {
+ case 'Project':
+ // all tickets for that project..
+ $conds[] = "(
+ ontable = 'mtrack_ticket'
+ AND
+ onid IN (
+ SELECT id from mtrack_ticket where project_id = $id
+ )
+ )";
+ break;
+
+ case 'Ticket':
+ $conds[] = "(
+ ontable = 'mtrack_ticket'
+ AND
+ onid = $id
+ )";
+ break;
+
+
+
+
+
+ }
+
+
+ }
+
+