Defect #5154 » change_name_limit.patch
| app/models/issue_category.rb (working copy) | ||
|---|---|---|
|
|
||
|
validates_presence_of :name
|
||
|
validates_uniqueness_of :name, :scope => [:project_id]
|
||
|
validates_length_of :name, :maximum => 30
|
||
|
validates_length_of :name, :maximum => 60
|
||
|
|
||
|
alias :destroy_without_reassign :destroy
|
||
|
|
||
| app/models/enumeration.rb (working copy) | ||
|---|---|---|
|
|
||
|
validates_presence_of :name
|
||
|
validates_uniqueness_of :name, :scope => [:type, :project_id]
|
||
|
validates_length_of :name, :maximum => 30
|
||
|
validates_length_of :name, :maximum => 60
|
||
|
named_scope :shared, :conditions => { :project_id => nil }
|
||
|
named_scope :active, :conditions => { :active => true }
|
||
| app/models/custom_field.rb (working copy) | ||
|---|---|---|
|
validates_presence_of :name, :field_format
|
||
|
validates_uniqueness_of :name, :scope => :type
|
||
|
validates_length_of :name, :maximum => 30
|
||
|
validates_length_of :name, :maximum => 60
|
||
|
validates_format_of :name, :with => /^[\w\s\.\'\-]*$/i
|
||
|
validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
|
||
| app/models/issue_status.rb (working copy) | ||
|---|---|---|
|
validates_presence_of :name
|
||
|
validates_uniqueness_of :name
|
||
|
validates_length_of :name, :maximum => 30
|
||
|
validates_length_of :name, :maximum => 60
|
||
|
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
||
|
validates_inclusion_of :default_done_ratio, :in => 0..100, :allow_nil => true
|
||
| app/models/tracker.rb (working copy) | ||
|---|---|---|
|
validates_presence_of :name
|
||
|
validates_uniqueness_of :name
|
||
|
validates_length_of :name, :maximum => 30
|
||
|
validates_length_of :name, :maximum => 60
|
||
|
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
||
|
def to_s; name end
|
||
| app/models/role.rb (working copy) | ||
|---|---|---|
|
validates_presence_of :name
|
||
|
validates_uniqueness_of :name
|
||
|
validates_length_of :name, :maximum => 30
|
||
|
validates_length_of :name, :maximum => 60
|
||
|
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
||
|
def permissions
|
||
| app/models/project.rb (working copy) | ||
|---|---|---|
|
validates_presence_of :name, :identifier
|
||
|
validates_uniqueness_of :name, :identifier
|
||
|
validates_associated :repository, :wiki
|
||
|
validates_length_of :name, :maximum => 30
|
||
|
validates_length_of :name, :maximum => 60
|
||
|
validates_length_of :homepage, :maximum => 255
|
||
|
validates_length_of :identifier, :in => 1..20
|
||
|
# donwcase letters, digits, dashes but not digits only
|
||
| db/migrate/20100323105501_change_name_limit.rb (revision 0) | ||
|---|---|---|
|
class ChangeNameLimit < ActiveRecord::Migration
|
||
|
def self.up
|
||
|
change_column :auth_sources, :name, :string, :limit => nil
|
||
|
change_column :custom_fields, :name, :string, :limit => nil
|
||
|
change_column :enumerations, :name, :string, :limit => nil
|
||
|
change_column :issue_categories, :name, :string, :limit => nil
|
||
|
change_column :issue_statuses, :name, :string, :limit => nil
|
||
|
change_column :projects, :name, :string, :limit => nil
|
||
|
change_column :roles, :name, :string, :limit => nil
|
||
|
change_column :trackers, :name, :string, :limit => nil
|
||
|
end
|
||
|
def self.down
|
||
|
change_column :auth_sources, :name, :string, :limit => 60
|
||
|
change_column :custom_fields, :name, :string, :limit => 30
|
||
|
change_column :enumerations, :name, :string, :limit => 30
|
||
|
change_column :issue_categories, :name, :string, :limit => 30
|
||
|
change_column :issue_statuses, :name, :string, :limit => 30
|
||
|
change_column :projects, :name, :string, :limit => 30
|
||
|
change_column :roles, :name, :string, :limit => 30
|
||
|
change_column :trackers, :name, :string, :limit => 30
|
||
|
end
|
||
|
end
|
||
- « Previous
- 1
- 2
- Next »