NewBranch.bjs
[gitlive] / NewBranch.vala
index 8b0c66f..d468b49 100644 (file)
@@ -199,6 +199,15 @@ public class NewBranch : Object
                _this.dbmodel.el.get_value (iter, 0, out val1);
                _this.dbmodel.el.get_value (iter, 1, out val2);
             
+               var ticket_id = (string) val1;
+               
+               if (ticket_id == "") {
+                       _this.name.el.set_text("wip_NAME_DATE");
+                       return;
+               }
+               var ticket = RooTicket.singleton().getById(ticket_id);
+               
+                       _this.name.el.set_text("wip_NAME_%s".printf(ticket.toBranchName());
                GLib.debug ("Selection: %s, %s\n", (string) val1, (string) val2);
             });
         }