MTrack/SCM/Git/CommitHookBridge.php
[web.mtrack] / MTrack / CommitChecker.php
index 7340630..444ad7b 100644 (file)
@@ -264,17 +264,23 @@ class MTrack_CommitChecker {
             }
             
             // apply changes to tickets
+            $T = false;
             foreach ($tickets as $tkt => $act) {
                 // removed all the code that handles hashed ticked ids...
-                
+                //DB_DataObject::DebugLevel(1);
                 $T = DB_DataObject::Factory('mtrack_ticket');
-                $T->project_id = $this->repo->id;
+                $T->project_id = $this->repo->project_id;
                 if (!$T->get($tkt)) {
                     continue;
                 }
+                break;
                 
                 $T_by_tid[$T->id] = $T;
             }
+            
+            if (!$T) {
+                continue;
+            }
             /*
             $accounted = false;