Commit 30d46c86 authored by Jan Provaznik's avatar Jan Provaznik Committed by Jarka Kadlecová

Move todo_group_options to CE

parent c03899b3
......@@ -169,4 +169,14 @@ module TodosHelper
def show_todo_state?(todo)
(todo.target.is_a?(MergeRequest) || todo.target.is_a?(Issue)) && %w(closed merged).include?(todo.target.state)
end
def todo_group_options
groups = current_user.authorized_groups
groups = groups.map do |group|
{ id: group.id, text: group.full_name }
end
groups.unshift({ id: '', text: 'Any Group' }).to_json
end
end
......@@ -6,15 +6,5 @@ module EE
def todo_types_options
super << { id: 'Epic', text: 'Epic' }
end
def todo_group_options
groups = current_user.authorized_groups
groups = groups.map do |group|
{ id: group.id, text: group.full_name }
end
groups.unshift({ id: '', text: 'Any Group' }).to_json
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment