mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-23 17:01:13 +00:00
Moved Version#fixed_issues extension to a module (#30115).
Patch by Jérôme BATAILLE. git-svn-id: http://svn.redmine.org/redmine/trunk@17754 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
22f93b566d
commit
537f162f27
@ -15,15 +15,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class Version < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
|
||||
after_update :update_issues_from_sharing_change
|
||||
after_save :update_default_project_version
|
||||
before_destroy :nullify_projects_default_version
|
||||
|
||||
belongs_to :project
|
||||
has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id', :dependent => :nullify do
|
||||
module FixedIssuesExtension
|
||||
# Returns the total estimated time for this version
|
||||
# (sum of leaves estimated_hours)
|
||||
def estimated_hours
|
||||
@ -112,7 +104,17 @@ class Version < ActiveRecord::Base
|
||||
progress
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Version < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
|
||||
after_update :update_issues_from_sharing_change
|
||||
after_save :update_default_project_version
|
||||
before_destroy :nullify_projects_default_version
|
||||
|
||||
belongs_to :project
|
||||
has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id', :dependent => :nullify, :extend => FixedIssuesExtension
|
||||
|
||||
acts_as_customizable
|
||||
acts_as_attachable :view_permission => :view_files,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user