@@ -464,7 +464,6 namespace :redmine do | |||
|
464 | 464 |
|
|
465 | 465 |
|
|
466 | 466 |
|
|
467 | i.custom_values << CustomValue.new(:custom_field => custom_field_map['resolution'], :value => ticket.resolution) unless ticket.resolution.blank? | |
|
468 | 467 |
|
|
469 | 468 |
|
|
470 | 469 |
|
@@ -516,14 +515,18 namespace :redmine do | |||
|
516 | 515 |
|
|
517 | 516 | |
|
518 | 517 |
|
|
519 |
|
|
|
520 |
|
|
|
521 | v = CustomValue.new :custom_field => custom_field_map[custom.name], | |
|
522 | :value => custom.value | |
|
523 | v.customized = i | |
|
524 | next unless v.save | |
|
518 | custom_values = ticket.customs.inject({}) do |h, custom| | |
|
519 | if custom_field = custom_field_map[custom.name] | |
|
520 | h[custom_field.id] = custom.value | |
|
525 | 521 | migrated_custom_values += 1 |
|
526 | 522 |
|
|
523 | h | |
|
524 | end | |
|
525 | if custom_field_map['resolution'] && !ticket.resolution.blank? | |
|
526 | custom_values[custom_field_map['resolution'].id] = ticket.resolution | |
|
527 | end | |
|
528 | i.custom_field_values = custom_values | |
|
529 | i.save_custom_field_values | |
|
527 | 530 | end |
|
528 | 531 | |
|
529 | 532 | # update issue id sequence if needed (postgresql) |
General Comments 0
You need to be logged in to leave comments.
Login now