diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-24 06:22:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-24 06:22:55 +0000 |
commit | 68620da79ab51c808e6ba1b1cfa496494760ee47 (patch) | |
tree | 18dcd8b997417fa7a7174611f8d174e8a87511d9 /app/models | |
parent | aeab970972dc27791714383e1d27a45afa3f4304 (diff) | |
download | redmine-68620da79ab51c808e6ba1b1cfa496494760ee47.tar.gz redmine-68620da79ab51c808e6ba1b1cfa496494760ee47.zip |
Don't require category or target version when they are not available (#20583).
git-svn-id: http://svn.redmine.org/redmine/trunk@14733 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index d07041ff1..9301dc9f7 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -677,6 +677,8 @@ class Issue < ActiveRecord::Base end else if respond_to?(attribute) && send(attribute).blank? && !disabled_core_fields.include?(attribute) + next if attribute == 'category_id' && project.try(:issue_categories).blank? + next if attribute == 'fixed_version_id' && assignable_versions.blank? errors.add attribute, :blank end end |