|
|
|
|
|
|
|
|
role_ids = Role.all.select(&:consider_workflow?).map(&:id) |
|
|
role_ids = Role.all.select(&:consider_workflow?).map(&:id) |
|
|
status_ids = WorkflowTransition.where( |
|
|
status_ids = WorkflowTransition.where( |
|
|
:tracker_id => @trackers.map(&:id), :role_id => role_ids |
|
|
:tracker_id => @trackers.map(&:id), :role_id => role_ids |
|
|
).uniq.pluck(:old_status_id, :new_status_id).flatten.uniq |
|
|
|
|
|
|
|
|
).distinct.pluck(:old_status_id, :new_status_id).flatten.uniq |
|
|
@statuses = IssueStatus.where(:id => status_ids).sorted.to_a.presence |
|
|
@statuses = IssueStatus.where(:id => status_ids).sorted.to_a.presence |
|
|
end |
|
|
end |
|
|
@statuses ||= IssueStatus.sorted.to_a |
|
|
@statuses ||= IssueStatus.sorted.to_a |