@@ -73,50 +73,34 @@ namespace :redmine do
73
73
Member . create! ( :principal => user , :project => project , :role_ids => [ Role . find_by_name ( role_name ) . id ] )
74
74
end
75
75
gforge_group . document_groups . each do |document_group |
76
- document_category = showing_migrated_ids ( document_group ) do
77
- document_group . convert_to_redmine_document_category_on ( project )
78
- end
76
+ document_category = showing_migrated_ids ( document_group ) { document_group . convert_to_redmine_document_category_on ( project ) }
79
77
document_group . documents . each do |gforge_document |
80
- gforge_document = showing_migrated_ids ( gforge_document ) do
81
- gforge_document . convert_to_redmine_document_in ( document_category )
82
- end
78
+ showing_migrated_ids ( gforge_document ) { gforge_document . convert_to_redmine_document_in ( document_category ) }
83
79
end
84
80
end
85
81
gforge_group . artifact_group_lists . each do |artifact_group_list |
86
82
project . trackers << Tracker . find_by_name ( artifact_group_list . corresponding_redmine_tracker_name ) unless project . trackers . find_by_name ( artifact_group_list . corresponding_redmine_tracker_name )
87
83
artifact_group_list . artifacts . each do |artifact |
88
- issue = showing_migrated_ids ( artifact ) do
89
- artifact . convert_to_redmine_issue_in ( project )
90
- end
84
+ issue = showing_migrated_ids ( artifact ) { artifact . convert_to_redmine_issue_in ( project ) }
91
85
artifact . monitors . each do |artifact_monitor |
92
- showing_migrated_ids ( artifact_monitor ) do
93
- artifact_monitor . convert_to_redmine_watcher_on ( issue )
94
- end
86
+ showing_migrated_ids ( artifact_monitor ) { artifact_monitor . convert_to_redmine_watcher_on ( issue ) }
95
87
end
96
88
artifact . messages . each do |artifact_message |
97
- showing_migrated_ids ( artifact_message ) do
98
- artifact_message . convert_to_redmine_journal_on ( issue )
99
- end
89
+ showing_migrated_ids ( artifact_message ) { artifact_message . convert_to_redmine_journal_on ( issue ) }
100
90
end
101
91
artifact . files . each do |artifact_file |
102
- showing_migrated_ids ( artifact_file ) do
103
- artifact_file . convert_to_redmine_attachment_to ( issue )
104
- end
92
+ showing_migrated_ids ( artifact_file ) { artifact_file . convert_to_redmine_attachment_to ( issue ) }
105
93
end
106
94
artifact . histories . find ( :all , :order => "entrydate asc" ) . each do |artifact_history |
107
- showing_migrated_ids ( artifact_history ) do
108
- artifact_history . convert_to_redmine_journal_on ( issue )
109
- end
95
+ showing_migrated_ids ( artifact_history ) { artifact_history . convert_to_redmine_journal_on ( issue ) }
110
96
end
111
97
end
112
98
end
113
99
gforge_group . forum_groups . active . each do |forum_group |
114
100
board = forum_group . convert_to_redmine_board_in ( project )
115
101
board_threads = { }
116
102
forum_group . forum_messages . find ( :all , :order => "msg_id asc" ) . each do |forum_message |
117
- message = showing_migrated_ids ( forum_message ) do
118
- forum_message . convert_to_redmine_message_in ( board )
119
- end
103
+ message = showing_migrated_ids ( forum_message ) { forum_message . convert_to_redmine_message_in ( board ) }
120
104
board_threads [ forum_message . id ] = message
121
105
if forum_message . is_followup_to
122
106
possible_parent = board_threads [ forum_message . is_followup_to ]
@@ -132,9 +116,7 @@ namespace :redmine do
132
116
end
133
117
end
134
118
forum_group . monitors . each do |monitor |
135
- showing_migrated_ids ( monitor ) do
136
- monitor . convert_to_redmine_watcher_on ( board )
137
- end
119
+ showing_migrated_ids ( monitor ) { monitor . convert_to_redmine_watcher_on ( board ) }
138
120
end
139
121
end
140
122
#end
0 commit comments