@@ 137,7 137,20 @@ EOS
# Syncs ditz issues -> Trac
def create_tickets( issues, trac )
+ components = trac.query("ticket.component.getAll")
+ milestones = trac.query("ticket.milestone.getAll")
issues.each do |t,i| # t will always be nil
+ attrs = { "created_at" => i.creation_time,
+ "type" => DTYPE_TTYPE[ i.type ],
+ "reporter" => i.reporter || "",
+ "milestone" => i.release || "",
+ "component" => i.component || "",
+ "status" => DSTATUS_TSTATUS[ i.status ] || "",
+ "resolution" => DISPO_RES[ i.disposition ] || ""
+ }
+ p attrs
+ tid = trac.tickets.create( i.title, i.desc, attrs )
+ i.trac_id = tid
end
end