Browse Source

Raises maximum length of category name to 60 (#20991).

git-svn-id: http://svn.redmine.org/redmine/trunk@14724 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/3.2.0
Jean-Philippe Lang 8 years ago
parent
commit
05106b45ad

+ 1
- 1
app/models/issue_category.rb View File

@@ -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'

+ 1
- 1
app/views/issue_categories/_form.html.erb View File

@@ -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>

+ 9
- 0
db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb View File

@@ -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

Loading…
Cancel
Save