Added ability to clear milestone/assignee during bulk update
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
75f0ff2ce1
commit
11aa7b0025
2 changed files with 10 additions and 2 deletions
|
@ -68,4 +68,12 @@ module IssuesHelper
|
|||
false
|
||||
end
|
||||
end
|
||||
|
||||
def bulk_update_milestone_options
|
||||
options_for_select(["None (backlog)", nil]) + options_from_collection_for_select(project_active_milestones, "id", "title", params[:milestone_id])
|
||||
end
|
||||
|
||||
def bulk_update_assignee_options
|
||||
options_for_select(["None (unassigned)", nil]) + options_from_collection_for_select(@project.team.members, "id", "name", params[:assignee_id])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
= form_tag bulk_update_project_issues_path(@project), method: :post do
|
||||
%span Update selected issues with
|
||||
= select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status")
|
||||
= select_tag('update[assignee_id]', options_from_collection_for_select(@project.team.members, "id", "name", params[:assignee_id]), prompt: "Assignee")
|
||||
= select_tag('update[milestone_id]', options_from_collection_for_select(project_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
|
||||
= select_tag('update[assignee_id]', bulk_update_assignee_options, prompt: "Assignee")
|
||||
= select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
|
||||
= hidden_field_tag 'update[issues_ids]', []
|
||||
= hidden_field_tag :status, params[:status]
|
||||
= button_tag "Save", class: "btn update_selected_issues btn-small btn-save"
|
||||
|
|
Loading…
Reference in a new issue