diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-02 19:45:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-02 19:45:14 +0000 |
commit | dfc594c33702a123674dcae1d6b4bfe3a2f32fd3 (patch) | |
tree | 42f8653451b35f54db68bf914e1d963bfaf13418 /lib/tasks/migrate_from_trac.rake | |
parent | 32b79b6fd4e3a523ee393d7a3e2bb60dbeed77c3 (diff) | |
download | redmine-dfc594c33702a123674dcae1d6b4bfe3a2f32fd3.tar.gz redmine-dfc594c33702a123674dcae1d6b4bfe3a2f32fd3.zip |
Default status per tracker (#5991).
git-svn-id: http://svn.redmine.org/redmine/trunk@13535 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks/migrate_from_trac.rake')
-rw-r--r-- | lib/tasks/migrate_from_trac.rake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index d1a3873f5..f3be605c1 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -25,12 +25,12 @@ namespace :redmine do module TracMigrate TICKET_MAP = [] - DEFAULT_STATUS = IssueStatus.default + new_status = IssueStatus.find_by_position(1) assigned_status = IssueStatus.find_by_position(2) resolved_status = IssueStatus.find_by_position(3) feedback_status = IssueStatus.find_by_position(4) closed_status = IssueStatus.where(:is_closed => true).first - STATUS_MAPPING = {'new' => DEFAULT_STATUS, + STATUS_MAPPING = {'new' => new_status, 'reopened' => feedback_status, 'assigned' => assigned_status, 'closed' => closed_status @@ -476,8 +476,8 @@ namespace :redmine do i.author = find_or_create_user(ticket.reporter) i.category = issues_category_map[ticket.component] unless ticket.component.blank? i.fixed_version = version_map[ticket.milestone] unless ticket.milestone.blank? - i.status = STATUS_MAPPING[ticket.status] || DEFAULT_STATUS i.tracker = TRACKER_MAPPING[ticket.ticket_type] || DEFAULT_TRACKER + i.status = STATUS_MAPPING[ticket.status] || i.default_status i.id = ticket.id unless Issue.exists?(ticket.id) next unless Time.fake(ticket.changetime) { i.save } TICKET_MAP[ticket.id] = i.id |