mirror of
https://github.com/redmine/redmine.git
synced 2026-04-01 10:10:56 +02:00
Merged r22833 to 5.1-stable (#40693).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22836 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -492,6 +492,7 @@ class Project < ActiveRecord::Base
|
||||
def rolled_up_statuses
|
||||
issue_status_ids = WorkflowTransition.
|
||||
where(:tracker_id => rolled_up_trackers.map(&:id)).
|
||||
where('old_status_id <> new_status_id').
|
||||
distinct.
|
||||
pluck(:old_status_id, :new_status_id).
|
||||
flatten.
|
||||
|
||||
@@ -107,6 +107,8 @@ class ReportsControllerTest < Redmine::ControllerTest
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 4)
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 2, :new_status_id => 5)
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :new_status_id => 6)
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 3, :new_status_id => 3)
|
||||
|
||||
with_settings :display_subprojects_issues => '0' do
|
||||
get(:issue_report_details, :params => {:id => 1, :detail => 'tracker'})
|
||||
end
|
||||
|
||||
@@ -534,6 +534,8 @@ class ProjectTest < ActiveSupport::TestCase
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 4)
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 2, :new_status_id => 3)
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :new_status_id => 3)
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 5, :new_status_id => 5)
|
||||
WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 5, :new_status_id => 5)
|
||||
|
||||
assert_kind_of IssueStatus, project.rolled_up_statuses.first
|
||||
assert_equal IssueStatus.find(1), project.rolled_up_statuses.first
|
||||
|
||||
Reference in New Issue
Block a user