diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2009-12-24 18:25:49 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2009-12-24 18:25:49 +0000 |
commit | 9fb40b1a2f700ce6e5bd31438fe9c9ef737555ab (patch) | |
tree | 54d370c97bfc8b13014431ab6f66b802ec9fcc09 /app/models | |
parent | 62c83bdd2e1b06fcd873ba6d638c0bf59e390958 (diff) | |
download | redmine-9fb40b1a2f700ce6e5bd31438fe9c9ef737555ab.tar.gz redmine-9fb40b1a2f700ce6e5bd31438fe9c9ef737555ab.zip |
Project#activities should check all overridden activities, not just active ones.
Fixes #4084
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3239 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 3f34393b3..4accf5a7c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -626,8 +626,8 @@ class Project < ActiveRecord::Base # Returns all the active Systemwide and project specific activities def active_activities - overridden_activity_ids = self.time_entry_activities.active.collect(&:parent_id) - + overridden_activity_ids = self.time_entry_activities.collect(&:parent_id) + if overridden_activity_ids.empty? return TimeEntryActivity.shared.active else @@ -657,7 +657,7 @@ class Project < ActiveRecord::Base else return TimeEntryActivity.shared.active. find(:all, - :conditions => ["id NOT IN (?)", self.time_entry_activities.active.collect(&:parent_id)]) + + :conditions => ["id NOT IN (?)", self.time_entry_activities.collect(&:parent_id)]) + self.time_entry_activities.active end end |