Project

General

Profile

Actions

Defect #11571

closed

Custom fields of type version not proper handled in receiving e-mails

Added by Klaus Günther over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Email receiving
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The value of customer fields of type version not converted to a version id while processing a received e-mail. It must be done like the issue field fixed_version_id.

The code in mail_handler.rb should be something like:

# Returns a Hash of issue custom field values extracted from keywords in the email body
def custom_field_values_from_keywords(customized)
  customized.custom_field_values.inject({}) do |h, v|
    if value = get_keyword(v.custom_field.name, :override => true)
      if v.custom_field.field_format == 'version'
        value = customized.project.shared_versions.named(value).first.try(:id).to_s
      end        
      h[v.custom_field.id.to_s] = value
    end
    h
  end
end

The problem is also in the current trunk.

Actions

Also available in: Atom PDF