diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-07-09 10:50:42 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-07-09 10:50:42 +0000 |
commit | 2072669769d24248789366e6552231c1cac5695d (patch) | |
tree | 260536878a7abf3983fba7f7905e93b6113f99a2 /app/models/mail_handler.rb | |
parent | 93c2b92a4b5b7003be3113b5d9baf2a0448402a8 (diff) | |
download | redmine-2072669769d24248789366e6552231c1cac5695d.tar.gz redmine-2072669769d24248789366e6552231c1cac5695d.zip |
Fixed: Setting issue attributes from mail should be case-insensitive (#8759).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6199 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mail_handler.rb')
-rw-r--r-- | app/models/mail_handler.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index a312301d2..dbbd4f5f3 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -265,12 +265,12 @@ class MailHandler < ActionMailer::Base assigned_to = nil if assigned_to && !issue.assignable_users.include?(assigned_to) attrs = { - 'tracker_id' => (k = get_keyword(:tracker)) && issue.project.trackers.find_by_name(k).try(:id), - 'status_id' => (k = get_keyword(:status)) && IssueStatus.find_by_name(k).try(:id), - 'priority_id' => (k = get_keyword(:priority)) && IssuePriority.find_by_name(k).try(:id), - 'category_id' => (k = get_keyword(:category)) && issue.project.issue_categories.find_by_name(k).try(:id), + 'tracker_id' => (k = get_keyword(:tracker)) && issue.project.trackers.named(k).first.try(:id), + 'status_id' => (k = get_keyword(:status)) && IssueStatus.named(k).first.try(:id), + 'priority_id' => (k = get_keyword(:priority)) && IssuePriority.named(k).first.try(:id), + 'category_id' => (k = get_keyword(:category)) && issue.project.issue_categories.named(k).first.try(:id), 'assigned_to_id' => assigned_to.try(:id), - 'fixed_version_id' => (k = get_keyword(:fixed_version, :override => true)) && issue.project.shared_versions.find_by_name(k).try(:id), + 'fixed_version_id' => (k = get_keyword(:fixed_version, :override => true)) && issue.project.shared_versions.named(k).first.try(:id), 'start_date' => get_keyword(:start_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'), 'due_date' => get_keyword(:due_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'), 'estimated_hours' => get_keyword(:estimated_hours, :override => true), |