Commits

Yuya Nishihara committed 58d02e4

added subject prefix which contains original bug id

  • Participants
  • Parent commits 635afa3

Comments (0)

Files changed (1)

File lib/tasks/import_kagemai_reports.rake

       end
     end
 
+    def self.reformat_subject(report)
+      "[Kagemai:#{'%03d' % report.id}] #{encode(report.attr('title'))}"
+    end
+
     def self.import_project(redmine_proj_id, kagemai_proj_id)
       raise 'redmine_project not specified' unless redmine_proj_id
       raise 'kagemai_project not specified' unless kagemai_proj_id
       redmine_proj = Project.find_by_identifier(redmine_proj_id) or raise "unknown redmine project: #{redmine_proj_id}"
       kagemai_proj = @bts.open_project(kagemai_proj_id)
       kagemai_proj.each do |rep|
-        issue = Issue.new(:subject => encode(rep.attr('title')), :description => reformat_description(kagemai_proj_id, rep),
+        issue = Issue.new(:subject => reformat_subject(rep), :description => reformat_description(kagemai_proj_id, rep),
                           :created_on => rep.create_time)
         issue.project = redmine_proj
         issue.author = User.find_by_mail(encode(rep.first['email'])) or raise "unknown user: #{encode(rep.first['email'])}"