Commit f6147d3e authored by Phil Hughes's avatar Phil Hughes

Sets the boards default milestone in the filter bar

parent 021b781a
......@@ -63,7 +63,15 @@ $(() => {
},
created () {
if (this.milestoneTitle) {
this.state.filters.milestone_title = this.milestoneTitle;
const milestoneTitleParam = `milestone_title=${this.milestoneTitle}`;
let splitPath = Store.filter.path.split('&').filter((param) => {
return param.match(/^milestone_title=(.*)$/g) === null;
});
splitPath = [milestoneTitleParam].concat(splitPath);
Store.filter.path = splitPath.join('&');
Store.updateFiltersUrl();
}
gl.boardService = new BoardService(this.endpoint, this.bulkUpdatePath, this.boardId);
......
......@@ -4,9 +4,6 @@
.issues-filters
.issues-details-filters.row-content-block.second-block
- if boards_page && board
#js-multiple-boards-switcher.filter-item.inline.boards-switcher{ "v-cloak" => true }
= render "projects/boards/switcher", board: board
= form_tag page_filter_path(without: [:assignee_id, :author_id, :milestone_title, :label_name, :search]), method: :get, class: 'filter-form js-filter-form' do
- if params[:search].present?
= hidden_field_tag :search, params[:search]
......
- type = local_assigns.fetch(:type)
- board = local_assigns.fetch(:board)
.issues-filters
.issues-details-filters.row-content-block.second-block.filtered-search-block
- if type == :boards && board
#js-multiple-boards-switcher.inline.boards-switcher{ "v-cloak" => true }
= render "projects/boards/switcher", board: board
= form_tag page_filter_path(without: [:assignee_id, :author_id, :milestone_title, :label_name, :search]), method: :get, class: 'filter-form js-filter-form' do
- if params[:search].present?
= hidden_field_tag :search, params[:search]
......@@ -60,6 +64,7 @@
{{name}}
%span.dropdown-light-content
@{{username}}
- unless board && board.milestone_id
#js-dropdown-milestone.dropdown-menu{ data: { icon: 'clock-o', hint: 'milestone', tag: '%milestone' } }
%ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { value: 'none' } }
......
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