diff options
-rw-r--r-- | app/models/issue_category.rb | 2 | ||||
-rw-r--r-- | app/views/issue_categories/_form.html.erb | 2 | ||||
-rw-r--r-- | db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb | 9 |
3 files changed, 11 insertions, 2 deletions
diff --git a/app/models/issue_category.rb b/app/models/issue_category.rb index a84c5350c..db8823ee2 100644 --- a/app/models/issue_category.rb +++ b/app/models/issue_category.rb @@ -23,7 +23,7 @@ class IssueCategory < ActiveRecord::Base validates_presence_of :name validates_uniqueness_of :name, :scope => [:project_id] - validates_length_of :name, :maximum => 30 + validates_length_of :name, :maximum => 60 attr_protected :id safe_attributes 'name', 'assigned_to_id' diff --git a/app/views/issue_categories/_form.html.erb b/app/views/issue_categories/_form.html.erb index c3b20936c..8a55d9eee 100644 --- a/app/views/issue_categories/_form.html.erb +++ b/app/views/issue_categories/_form.html.erb @@ -1,6 +1,6 @@ <%= error_messages_for 'category' %> <div class="box tabular"> -<p><%= f.text_field :name, :size => 30, :required => true %></p> +<p><%= f.text_field :name, :size => 60, :required => true %></p> <p><%= f.select :assigned_to_id, principals_options_for_select(@project.assignable_users, @category.assigned_to), :include_blank => true %></p> </div> diff --git a/db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb b/db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb new file mode 100644 index 000000000..b9c971edf --- /dev/null +++ b/db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb @@ -0,0 +1,9 @@ +class ChangeIssueCategoriesNameLimitTo60 < ActiveRecord::Migration + def self.up + change_column :issue_categories, :name, :string, :limit => 60, :default => "", :null => false + end + + def self.down + change_column :issue_categories, :name, :string, :limit => 30, :default => "", :null => false + end +end |