Patch #40693 ยป 0001-Ignore-statuses-in-Project-rolled_up_statuses-which-.patch
app/models/project.rb | ||
---|---|---|
494 | 494 |
def rolled_up_statuses |
495 | 495 |
issue_status_ids = WorkflowTransition. |
496 | 496 |
where(:tracker_id => rolled_up_trackers.map(&:id)). |
497 |
where('old_status_id <> new_status_id'). |
|
497 | 498 |
distinct. |
498 | 499 |
pluck(:old_status_id, :new_status_id). |
499 | 500 |
flatten. |
test/functional/reports_controller_test.rb | ||
---|---|---|
107 | 107 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 4) |
108 | 108 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 2, :new_status_id => 5) |
109 | 109 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :new_status_id => 6) |
110 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 3, :new_status_id => 3) |
|
111 | ||
110 | 112 |
with_settings :display_subprojects_issues => '0' do |
111 | 113 |
get(:issue_report_details, :params => {:id => 1, :detail => 'tracker'}) |
112 | 114 |
end |
test/unit/project_test.rb | ||
---|---|---|
534 | 534 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 4) |
535 | 535 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 2, :new_status_id => 3) |
536 | 536 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :new_status_id => 3) |
537 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 1, :old_status_id => 5, :new_status_id => 5) |
|
538 |
WorkflowTransition.create(:role_id => 1, :tracker_id => 2, :old_status_id => 5, :new_status_id => 5) |
|
537 | 539 | |
538 | 540 |
assert_kind_of IssueStatus, project.rolled_up_statuses.first |
539 | 541 |
assert_equal IssueStatus.find(1), project.rolled_up_statuses.first |