mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Raises time entries comments limit to 1024 (#19885).
git-svn-id: http://svn.redmine.org/redmine/trunk@14621 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a7b6ad9bb5
commit
5882629e26
@ -39,7 +39,7 @@ class TimeEntry < ActiveRecord::Base
|
|||||||
|
|
||||||
validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
|
validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
|
||||||
validates_numericality_of :hours, :allow_nil => true, :message => :invalid
|
validates_numericality_of :hours, :allow_nil => true, :message => :invalid
|
||||||
validates_length_of :comments, :maximum => 255, :allow_nil => true
|
validates_length_of :comments, :maximum => 1024, :allow_nil => true
|
||||||
validates :spent_on, :date => true
|
validates :spent_on, :date => true
|
||||||
before_validation :set_project_if_nil
|
before_validation :set_project_if_nil
|
||||||
validate :validate_time_entry
|
validate :validate_time_entry
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
|
<p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
|
||||||
<p><%= f.text_field :hours, :size => 6, :required => true %></p>
|
<p><%= f.text_field :hours, :size => 6, :required => true %></p>
|
||||||
<p><%= f.text_field :comments, :size => 100, :maxlength => 255 %></p>
|
<p><%= f.text_field :comments, :size => 100, :maxlength => 1024 %></p>
|
||||||
<p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
|
<p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
|
||||||
<% @time_entry.custom_field_values.each do |value| %>
|
<% @time_entry.custom_field_values.each do |value| %>
|
||||||
<p><%= custom_field_tag_with_label :time_entry, value %></p>
|
<p><%= custom_field_tag_with_label :time_entry, value %></p>
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
class ChangeTimeEntriesCommentsLimitTo1024 < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
change_column :time_entries, :comments, :string, :limit => 1024
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
change_column :time_entries, :comments, :string, :limit => 255
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user