Commit 6eeba418 authored by Ruben Davila's avatar Ruben Davila

Add basic version of estimate slash command.

parent 0d3edc67
......@@ -248,6 +248,15 @@ module SlashCommands
params '@user'
command :cc
desc 'Set estimate'
params 'e.g: 3h 30m'
condition do
issuable.persisted? &&
current_user.can?(:"update_#{issuable.to_ability_name}", issuable)
end
command :estimate do |raw_duration|
end
def find_label_ids(labels_param)
label_ids_by_reference = extract_references(labels_param, :label).map(&:id)
labels_ids_by_name = LabelsFinder.new(current_user, project_id: project.id, name: labels_param.split).execute.select(:id)
......
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