Fixed: default status not showing in new issue

git-svn-id: http://redmine.rubyforge.org/svn/trunk@475 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2007-04-24 15:19:49 +00:00
1 parent 018b81a46a
commit c995be94d9
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -39,7 +39,7 @@ class IssueStatus < ActiveRecord::Base
# Uses association cache when called more than one time
def new_statuses_allowed_to(role, tracker)
new_statuses = workflows.select {|w| w.role_id == role.id && w.tracker_id == tracker.id}.collect{|w| w.new_status} if role && tracker
new_statuses.sort{|x, y| x.position <=> y.position } if new_statuses
new_statuses ? new_statuses.sort{|x, y| x.position <=> y.position } : []
end
# Same thing as above but uses a database query
@@ -48,7 +48,7 @@ class IssueStatus < ActiveRecord::Base
new_statuses = workflows.find(:all,
:include => :new_status,
:conditions => ["role_id=? and tracker_id=?", role.id, tracker.id]).collect{ |w| w.new_status } if role && tracker
new_statuses.sort{|x, y| x.position <=> y.position } if new_statuses
new_statuses ? new_statuses.sort{|x, y| x.position <=> y.position } : []
end
private