Added issues status changes on the activity view (initial patch by Cyril Mougel).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@892 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+11
-1
@@ -75,7 +75,17 @@ class Project < ActiveRecord::Base
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Return all issues status changes for the project between the 2 given dates
|
||||
def issues_status_changes(from, to)
|
||||
Journal.find(:all, :include => [:issue, :details, :user],
|
||||
:conditions => ["#{Journal.table_name}.journalized_type = 'Issue'" +
|
||||
" AND #{Issue.table_name}.project_id = ?" +
|
||||
" AND #{JournalDetail.table_name}.prop_key = 'status_id'" +
|
||||
" AND #{Journal.table_name}.created_on BETWEEN ? AND ?",
|
||||
id, from, to+1])
|
||||
end
|
||||
|
||||
# returns latest created projects
|
||||
# non public projects will be returned only if user is a member of those
|
||||
def self.latest(user=nil, count=5)
|
||||
|
||||
Reference in New Issue
Block a user