Commit 5d8036a4 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu Committed by Phil Hughes

Add `Any` option to milestone filter

parent c1d821ed
...@@ -67,6 +67,11 @@ export const conditions = [ ...@@ -67,6 +67,11 @@ export const conditions = [
tokenKey: 'milestone', tokenKey: 'milestone',
value: 'none', value: 'none',
}, },
{
url: 'milestone_title=Any+Milestone',
tokenKey: 'milestone',
value: 'any',
},
{ {
url: 'milestone_title=%23upcoming', url: 'milestone_title=%23upcoming',
tokenKey: 'milestone', tokenKey: 'milestone',
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
%button.btn.btn-link{ type: 'button' } %button.btn.btn-link{ type: 'button' }
= sprite_icon('search') = sprite_icon('search')
%span %span
Press Enter or click to search = _('Press Enter or click to search')
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
%li.filter-dropdown-item %li.filter-dropdown-item
%button.btn.btn-link{ type: 'button' } %button.btn.btn-link{ type: 'button' }
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
%ul{ data: { dropdown: true } } %ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { value: 'none' } } %li.filter-dropdown-item{ data: { value: 'none' } }
%button.btn.btn-link{ type: 'button' } %button.btn.btn-link{ type: 'button' }
No Assignee = _('No Assignee')
%li.divider.droplab-item-ignore %li.divider.droplab-item-ignore
- if current_user - if current_user
= render 'shared/issuable/user_dropdown_item', = render 'shared/issuable/user_dropdown_item',
...@@ -74,13 +74,16 @@ ...@@ -74,13 +74,16 @@
%ul{ data: { dropdown: true } } %ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { value: 'none' } } %li.filter-dropdown-item{ data: { value: 'none' } }
%button.btn.btn-link{ type: 'button' } %button.btn.btn-link{ type: 'button' }
No Milestone = _('None')
%li.filter-dropdown-item{ data: { value: 'any' } }
%button.btn.btn-link{ type: 'button' }
= _('Any')
%li.filter-dropdown-item{ data: { value: 'upcoming' } } %li.filter-dropdown-item{ data: { value: 'upcoming' } }
%button.btn.btn-link{ type: 'button' } %button.btn.btn-link{ type: 'button' }
Upcoming = _('Upcoming')
%li.filter-dropdown-item{ 'data-value' => 'started' } %li.filter-dropdown-item{ 'data-value' => 'started' }
%button.btn.btn-link{ type: 'button' } %button.btn.btn-link{ type: 'button' }
Started = _('Started')
%li.divider.droplab-item-ignore %li.divider.droplab-item-ignore
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
%li.filter-dropdown-item %li.filter-dropdown-item
...@@ -90,7 +93,7 @@ ...@@ -90,7 +93,7 @@
%ul{ data: { dropdown: true } } %ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { value: 'none' } } %li.filter-dropdown-item{ data: { value: 'none' } }
%button.btn.btn-link{ type: 'button' } %button.btn.btn-link{ type: 'button' }
No Label = _('No Label')
%li.divider.droplab-item-ignore %li.divider.droplab-item-ignore
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
%li.filter-dropdown-item %li.filter-dropdown-item
......
---
title: Added `Any` option to milestones filter
merge_request: 22351
author: Heinrich Lee Yu
type: added
...@@ -68,7 +68,8 @@ From [project issue boards](../issue_board.md), you can filter by both group mil ...@@ -68,7 +68,8 @@ From [project issue boards](../issue_board.md), you can filter by both group mil
When filtering by milestone, in addition to choosing a specific project milestone or group milestone, you can choose a special milestone filter. When filtering by milestone, in addition to choosing a specific project milestone or group milestone, you can choose a special milestone filter.
- **No Milestone**: Show issues or merge requests with no assigned milestone. - **None**: Show issues or merge requests with no assigned milestone.
- **Any**: Show issues or merge requests that have an assigned milestone.
- **Upcoming**: Show issues or merge requests that have been assigned the open milestone that has the next upcoming due date (i.e. nearest due date in the future). - **Upcoming**: Show issues or merge requests that have been assigned the open milestone that has the next upcoming due date (i.e. nearest due date in the future).
- **Started**: Show issues or merge requests that have an assigned milestone with a start date that is before today. - **Started**: Show issues or merge requests that have an assigned milestone with a start date that is before today.
......
...@@ -4027,6 +4027,12 @@ msgstr "" ...@@ -4027,6 +4027,12 @@ msgstr ""
msgid "No" msgid "No"
msgstr "" msgstr ""
msgid "No Assignee"
msgstr ""
msgid "No Label"
msgstr ""
msgid "No assignee" msgid "No assignee"
msgstr "" msgstr ""
...@@ -6594,6 +6600,9 @@ msgstr "" ...@@ -6594,6 +6600,9 @@ msgstr ""
msgid "Up to date" msgid "Up to date"
msgstr "" msgstr ""
msgid "Upcoming"
msgstr ""
msgid "Update" msgid "Update"
msgstr "" msgstr ""
......
...@@ -189,13 +189,21 @@ describe 'Dropdown milestone', :js do ...@@ -189,13 +189,21 @@ describe 'Dropdown milestone', :js do
end end
it 'selects `no milestone`' do it 'selects `no milestone`' do
click_static_milestone('No Milestone') click_static_milestone('None')
expect(page).to have_css(js_dropdown_milestone, visible: false) expect(page).to have_css(js_dropdown_milestone, visible: false)
expect_tokens([milestone_token('none', false)]) expect_tokens([milestone_token('none', false)])
expect_filtered_search_input_empty expect_filtered_search_input_empty
end end
it 'selects `any milestone`' do
click_static_milestone('Any')
expect(page).to have_css(js_dropdown_milestone, visible: false)
expect_tokens([milestone_token('any', false)])
expect_filtered_search_input_empty
end
it 'selects `upcoming milestone`' do it 'selects `upcoming milestone`' do
click_static_milestone('Upcoming') click_static_milestone('Upcoming')
......
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