diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-07-23 18:18:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-07-23 18:18:13 +0000 |
commit | 578fdc62f26c23951b2d2c2b9be0040c7ade0634 (patch) | |
tree | 7f78426f78bdc325cae50368cc1bc3e23f4c5eaa /app/models/principal.rb | |
parent | e1832f25c9aa16f1a95434adc209ee937110228a (diff) | |
download | redmine-578fdc62f26c23951b2d2c2b9be0040c7ade0634.tar.gz redmine-578fdc62f26c23951b2d2c2b9be0040c7ade0634.zip |
Ability to assign issues to groups (#2964).
Option is disabled by default. It can be turned on in application settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6306 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/principal.rb')
-rw-r--r-- | app/models/principal.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb index b3e07dda5..a157cd22f 100644 --- a/app/models/principal.rb +++ b/app/models/principal.rb @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2009 Jean-Philippe Lang +# Copyright (C) 2006-2011 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -21,6 +21,7 @@ class Principal < ActiveRecord::Base has_many :members, :foreign_key => 'user_id', :dependent => :destroy has_many :memberships, :class_name => 'Member', :foreign_key => 'user_id', :include => [ :project, :roles ], :conditions => "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}", :order => "#{Project.table_name}.name" has_many :projects, :through => :memberships + has_many :issue_categories, :foreign_key => 'assigned_to_id', :dependent => :nullify # Groups and active users named_scope :active, :conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status = 1)" |