Fix #5723 - make ticket creation faster
[gitlive] / Ticket.vala
index 8d15130..251da7a 100644 (file)
@@ -153,12 +153,8 @@ public class Ticket : Object
                _this.spinner.el.hide();        
     
                this.table.el.show();
-        
-    
-          
-    
-        
-               
+           _this.summary.el.grab_focus();
+     
                return false;
        });
        this.el.run();
@@ -1169,17 +1165,16 @@ public class Ticket : Object
                    _this.developer_id.el.set_active_iter(iter);
            // }
             
-            var projects = rt.developers;
-            foreach(var project in projects) {
+            var peps = rt.developers;
+            foreach(var p in peps) {
             
                 el.append(out iter);
                 
-                el.set_value(iter, 0, project.id);
-                el.set_value(iter, 1,  project.display_name );
-        //        if (id == project.id) {
-               //         _this.projectsel.el.set_active_iter(iter);
-        //         }   
-                
+                el.set_value(iter, 0, p.id);
+                el.set_value(iter, 1,  p.display_name );
+                if (rt.authuser_id == p.id) {
+                          _this.developer_id.el.set_active_iter(iter);
+                   }   
             }
          
             _this.developer_id.loading = false;
@@ -1229,10 +1224,6 @@ public class Ticket : Object
                }
                
                _this.milestone_id.el.get_child().get_style_context().remove_class("warning");  
-               if (_this.milestone_id.selectedMilestoneId() == "") {
-                       _this.milestone_id.el.get_child().get_style_context().add_class("warning");
-                       invalid = true;
-               }
             
                _this.priority_id.el.get_child().get_style_context().remove_class("warning");   
                if (_this.priority_id.selectedPriorityId() == "") {
@@ -1259,12 +1250,7 @@ public class Ticket : Object
                }
                
                _this.description.el.get_style_context().remove_class("warning");       
-               if (_this.description.el.buffer.text == "") {
-                       _this.description.el.get_style_context().add_class("warning");
-                       invalid = true;
-               }
-               
-               
+             
                if (invalid) {
                        return;
                }