Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a94094a6
Commit
a94094a6
authored
Jan 28, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
6b479aa5
49c12f9b
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
71 additions
and
47 deletions
+71
-47
app/assets/javascripts/filtered_search/filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+1
-1
app/assets/javascripts/filtered_search/filtered_search_token_keys.js
...javascripts/filtered_search/filtered_search_token_keys.js
+4
-2
app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
...ts/filtered_search/issuable_filtered_search_token_keys.js
+11
-11
app/models/application_record.rb
app/models/application_record.rb
+4
-0
app/models/namespace.rb
app/models/namespace.rb
+1
-1
app/models/user.rb
app/models/user.rb
+1
-1
app/views/shared/issuable/_search_bar.html.haml
app/views/shared/issuable/_search_bar.html.haml
+10
-10
changelogs/unreleased/54213-standardize-token-value-capitalization-in-filter-bar.yml
...-standardize-token-value-capitalization-in-filter-bar.yml
+5
-0
spec/features/boards/modal_filter_spec.rb
spec/features/boards/modal_filter_spec.rb
+3
-3
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
...features/issues/filtered_search/dropdown_assignee_spec.rb
+2
-2
spec/features/issues/filtered_search/dropdown_emoji_spec.rb
spec/features/issues/filtered_search/dropdown_emoji_spec.rb
+2
-2
spec/features/issues/filtered_search/dropdown_label_spec.rb
spec/features/issues/filtered_search/dropdown_label_spec.rb
+2
-2
spec/features/issues/filtered_search/dropdown_milestone_spec.rb
...eatures/issues/filtered_search/dropdown_milestone_spec.rb
+4
-4
spec/features/issues/filtered_search/filter_issues_spec.rb
spec/features/issues/filtered_search/filter_issues_spec.rb
+5
-5
spec/features/issues/filtered_search/visual_tokens_spec.rb
spec/features/issues/filtered_search/visual_tokens_spec.rb
+3
-3
spec/models/application_record_spec.rb
spec/models/application_record_spec.rb
+13
-0
No files found.
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
a94094a6
...
...
@@ -616,7 +616,7 @@ export default class FilteredSearchManager {
tokens
.
forEach
(
token
=>
{
const
condition
=
this
.
filteredSearchTokenKeys
.
searchByConditionKeyValue
(
token
.
key
,
token
.
value
.
toLowerCase
()
,
token
.
value
,
);
const
tokenConfig
=
this
.
filteredSearchTokenKeys
.
searchByKey
(
token
.
key
)
||
{};
const
{
param
}
=
tokenConfig
;
...
...
app/assets/javascripts/filtered_search/filtered_search_token_keys.js
View file @
a94094a6
...
...
@@ -65,8 +65,10 @@ export default class FilteredSearchTokenKeys {
searchByConditionKeyValue
(
key
,
value
)
{
return
(
this
.
conditions
.
find
(
condition
=>
condition
.
tokenKey
===
key
&&
condition
.
value
===
value
)
||
null
this
.
conditions
.
find
(
condition
=>
condition
.
tokenKey
===
key
&&
condition
.
value
.
toLowerCase
()
===
value
.
toLowerCase
(),
)
||
null
);
}
...
...
app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
View file @
a94094a6
...
...
@@ -60,52 +60,52 @@ export const conditions = [
{
url
:
'
assignee_id=None
'
,
tokenKey
:
'
assignee
'
,
value
:
'
n
one
'
,
value
:
'
N
one
'
,
},
{
url
:
'
assignee_id=Any
'
,
tokenKey
:
'
assignee
'
,
value
:
'
a
ny
'
,
value
:
'
A
ny
'
,
},
{
url
:
'
milestone_title=None
'
,
tokenKey
:
'
milestone
'
,
value
:
'
n
one
'
,
value
:
'
N
one
'
,
},
{
url
:
'
milestone_title=Any
'
,
tokenKey
:
'
milestone
'
,
value
:
'
a
ny
'
,
value
:
'
A
ny
'
,
},
{
url
:
'
milestone_title=%23upcoming
'
,
tokenKey
:
'
milestone
'
,
value
:
'
u
pcoming
'
,
value
:
'
U
pcoming
'
,
},
{
url
:
'
milestone_title=%23started
'
,
tokenKey
:
'
milestone
'
,
value
:
'
s
tarted
'
,
value
:
'
S
tarted
'
,
},
{
url
:
'
label_name[]=None
'
,
tokenKey
:
'
label
'
,
value
:
'
n
one
'
,
value
:
'
N
one
'
,
},
{
url
:
'
label_name[]=Any
'
,
tokenKey
:
'
any
'
,
value
:
'
a
ny
'
,
tokenKey
:
'
label
'
,
value
:
'
A
ny
'
,
},
{
url
:
'
my_reaction_emoji=None
'
,
tokenKey
:
'
my-reaction
'
,
value
:
'
n
one
'
,
value
:
'
N
one
'
,
},
{
url
:
'
my_reaction_emoji=Any
'
,
tokenKey
:
'
my-reaction
'
,
value
:
'
a
ny
'
,
value
:
'
A
ny
'
,
},
];
...
...
app/models/application_record.rb
View file @
a94094a6
...
...
@@ -2,4 +2,8 @@
class
ApplicationRecord
<
ActiveRecord
::
Base
self
.
abstract_class
=
true
def
self
.
id_in
(
ids
)
where
(
id:
ids
)
end
end
app/models/namespace.rb
View file @
a94094a6
# frozen_string_literal: true
class
Namespace
<
A
ctiveRecord
::
Base
class
Namespace
<
A
pplicationRecord
include
CacheMarkdownField
include
Sortable
include
Gitlab
::
VisibilityLevel
...
...
app/models/user.rb
View file @
a94094a6
...
...
@@ -2,7 +2,7 @@
require
'carrierwave/orm/activerecord'
class
User
<
A
ctiveRecord
::
Base
class
User
<
A
pplicationRecord
extend
Gitlab
::
ConfigHelper
include
Gitlab
::
ConfigHelper
...
...
app/views/shared/issuable/_search_bar.html.haml
View file @
a94094a6
...
...
@@ -57,10 +57,10 @@
avatar:
{
lazy:
true
,
url:
'{{avatar_url}}'
}
#js-dropdown-assignee
.filtered-search-input-dropdown-menu.dropdown-menu
%ul
{
data:
{
dropdown:
true
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
n
one'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
N
one'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'None'
)
%li
.filter-dropdown-item
{
data:
{
value:
'
a
ny'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
A
ny'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Any'
)
%li
.divider.droplab-item-ignore
...
...
@@ -73,16 +73,16 @@
avatar:
{
lazy:
true
,
url:
'{{avatar_url}}'
}
#js-dropdown-milestone
.filtered-search-input-dropdown-menu.dropdown-menu
%ul
{
data:
{
dropdown:
true
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
n
one'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
N
one'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'None'
)
%li
.filter-dropdown-item
{
data:
{
value:
'
a
ny'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
A
ny'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Any'
)
%li
.filter-dropdown-item
{
data:
{
value:
'
u
pcoming'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
U
pcoming'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Upcoming'
)
%li
.filter-dropdown-item
{
data:
{
value:
'
s
tarted'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
S
tarted'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Started'
)
%li
.divider.droplab-item-ignore
...
...
@@ -92,10 +92,10 @@
{{title}}
#js-dropdown-label
.filtered-search-input-dropdown-menu.dropdown-menu
%ul
{
data:
{
dropdown:
true
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
n
one'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
N
one'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'None'
)
%li
.filter-dropdown-item
{
data:
{
value:
'
a
ny'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
A
ny'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Any'
)
%li
.divider.droplab-item-ignore
...
...
@@ -107,10 +107,10 @@
{{title}}
#js-dropdown-my-reaction
.filtered-search-input-dropdown-menu.dropdown-menu
%ul
{
data:
{
dropdown:
true
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
n
one'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
N
one'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'None'
)
%li
.filter-dropdown-item
{
data:
{
value:
'
a
ny'
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'
A
ny'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Any'
)
%li
.divider.droplab-item-ignore
...
...
changelogs/unreleased/54213-standardize-token-value-capitalization-in-filter-bar.yml
0 → 100644
View file @
a94094a6
---
title
:
Standardize filter value capitlization in filter bar in both issues and boards pages
merge_request
:
23846
author
:
obahareth
type
:
changed
spec/features/boards/modal_filter_spec.rb
View file @
a94094a6
...
...
@@ -112,7 +112,7 @@ describe 'Issue Boards add issue modal filtering', :js do
page
.
within
(
'.add-issues-modal'
)
do
wait_for_requests
expect
(
page
).
to
have_selector
(
'.js-visual-token'
,
text:
'
n
one'
)
expect
(
page
).
to
have_selector
(
'.js-visual-token'
,
text:
'
N
one'
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
1
)
end
end
...
...
@@ -147,7 +147,7 @@ describe 'Issue Boards add issue modal filtering', :js do
page
.
within
(
'.add-issues-modal'
)
do
wait_for_requests
expect
(
page
).
to
have_selector
(
'.js-visual-token'
,
text:
'
u
pcoming'
)
expect
(
page
).
to
have_selector
(
'.js-visual-token'
,
text:
'
U
pcoming'
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
0
)
end
end
...
...
@@ -182,7 +182,7 @@ describe 'Issue Boards add issue modal filtering', :js do
page
.
within
(
'.add-issues-modal'
)
do
wait_for_requests
expect
(
page
).
to
have_selector
(
'.js-visual-token'
,
text:
'
n
one'
)
expect
(
page
).
to
have_selector
(
'.js-visual-token'
,
text:
'
N
one'
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
1
)
end
end
...
...
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
View file @
a94094a6
...
...
@@ -160,7 +160,7 @@ describe 'Dropdown assignee', :js do
find
(
'#js-dropdown-assignee .filter-dropdown-item'
,
text:
'None'
).
click
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect_tokens
([
assignee_token
(
'
n
one'
)])
expect_tokens
([
assignee_token
(
'
N
one'
)])
expect_filtered_search_input_empty
end
...
...
@@ -168,7 +168,7 @@ describe 'Dropdown assignee', :js do
find
(
'#js-dropdown-assignee .filter-dropdown-item'
,
text:
'Any'
).
click
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect_tokens
([
assignee_token
(
'
a
ny'
)])
expect_tokens
([
assignee_token
(
'
A
ny'
)])
expect_filtered_search_input_empty
end
end
...
...
spec/features/issues/filtered_search/dropdown_emoji_spec.rb
View file @
a94094a6
...
...
@@ -125,7 +125,7 @@ describe 'Dropdown emoji', :js do
find
(
'#js-dropdown-my-reaction .filter-dropdown-item'
,
text:
'None'
).
click
expect
(
page
).
to
have_css
(
js_dropdown_emoji
,
visible:
false
)
expect_tokens
([
reaction_token
(
'
n
one'
,
false
)])
expect_tokens
([
reaction_token
(
'
N
one'
,
false
)])
expect_filtered_search_input_empty
end
...
...
@@ -133,7 +133,7 @@ describe 'Dropdown emoji', :js do
find
(
'#js-dropdown-my-reaction .filter-dropdown-item'
,
text:
'Any'
).
click
expect
(
page
).
to
have_css
(
js_dropdown_emoji
,
visible:
false
)
expect_tokens
([
reaction_token
(
'
a
ny'
,
false
)])
expect_tokens
([
reaction_token
(
'
A
ny'
,
false
)])
expect_filtered_search_input_empty
end
...
...
spec/features/issues/filtered_search/dropdown_label_spec.rb
View file @
a94094a6
...
...
@@ -238,7 +238,7 @@ describe 'Dropdown label', :js do
find
(
"
#{
js_dropdown_label
}
.filter-dropdown-item"
,
text:
'None'
).
click
expect
(
page
).
not_to
have_css
(
js_dropdown_label
)
expect_tokens
([
label_token
(
'
n
one'
,
false
)])
expect_tokens
([
label_token
(
'
N
one'
,
false
)])
expect_filtered_search_input_empty
end
...
...
@@ -246,7 +246,7 @@ describe 'Dropdown label', :js do
find
(
"
#{
js_dropdown_label
}
.filter-dropdown-item"
,
text:
'Any'
).
click
expect
(
page
).
not_to
have_css
(
js_dropdown_label
)
expect_tokens
([
label_token
(
'
a
ny'
,
false
)])
expect_tokens
([
label_token
(
'
A
ny'
,
false
)])
expect_filtered_search_input_empty
end
end
...
...
spec/features/issues/filtered_search/dropdown_milestone_spec.rb
View file @
a94094a6
...
...
@@ -192,7 +192,7 @@ describe 'Dropdown milestone', :js do
click_static_milestone
(
'None'
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect_tokens
([
milestone_token
(
'
n
one'
,
false
)])
expect_tokens
([
milestone_token
(
'
N
one'
,
false
)])
expect_filtered_search_input_empty
end
...
...
@@ -200,7 +200,7 @@ describe 'Dropdown milestone', :js do
click_static_milestone
(
'Any'
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect_tokens
([
milestone_token
(
'
a
ny'
,
false
)])
expect_tokens
([
milestone_token
(
'
A
ny'
,
false
)])
expect_filtered_search_input_empty
end
...
...
@@ -208,7 +208,7 @@ describe 'Dropdown milestone', :js do
click_static_milestone
(
'Upcoming'
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect_tokens
([
milestone_token
(
'
u
pcoming'
,
false
)])
expect_tokens
([
milestone_token
(
'
U
pcoming'
,
false
)])
expect_filtered_search_input_empty
end
...
...
@@ -216,7 +216,7 @@ describe 'Dropdown milestone', :js do
click_static_milestone
(
'Started'
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect_tokens
([
milestone_token
(
'
s
tarted'
,
false
)])
expect_tokens
([
milestone_token
(
'
S
tarted'
,
false
)])
expect_filtered_search_input_empty
end
end
...
...
spec/features/issues/filtered_search/filter_issues_spec.rb
View file @
a94094a6
...
...
@@ -108,7 +108,7 @@ describe 'Filter issues', :js do
it
'filters issues by no assignee'
do
input_filtered_search
(
'assignee:none'
)
expect_tokens
([
assignee_token
(
'
n
one'
)])
expect_tokens
([
assignee_token
(
'
N
one'
)])
expect_issues_list_count
(
3
)
expect_filtered_search_input_empty
end
...
...
@@ -146,7 +146,7 @@ describe 'Filter issues', :js do
it
'filters issues by no label'
do
input_filtered_search
(
'label:none'
)
expect_tokens
([
label_token
(
'
n
one'
,
false
)])
expect_tokens
([
label_token
(
'
N
one'
,
false
)])
expect_issues_list_count
(
4
)
expect_filtered_search_input_empty
end
...
...
@@ -287,7 +287,7 @@ describe 'Filter issues', :js do
it
'filters issues by no milestone'
do
input_filtered_search
(
"milestone:none"
)
expect_tokens
([
milestone_token
(
'
n
one'
,
false
)])
expect_tokens
([
milestone_token
(
'
N
one'
,
false
)])
expect_issues_list_count
(
3
)
expect_filtered_search_input_empty
end
...
...
@@ -299,7 +299,7 @@ describe 'Filter issues', :js do
input_filtered_search
(
"milestone:upcoming"
)
expect_tokens
([
milestone_token
(
'
u
pcoming'
,
false
)])
expect_tokens
([
milestone_token
(
'
U
pcoming'
,
false
)])
expect_issues_list_count
(
1
)
expect_filtered_search_input_empty
end
...
...
@@ -307,7 +307,7 @@ describe 'Filter issues', :js do
it
'filters issues by started milestones'
do
input_filtered_search
(
"milestone:started"
)
expect_tokens
([
milestone_token
(
'
s
tarted'
,
false
)])
expect_tokens
([
milestone_token
(
'
S
tarted'
,
false
)])
expect_issues_list_count
(
5
)
expect_filtered_search_input_empty
end
...
...
spec/features/issues/filtered_search/visual_tokens_spec.rb
View file @
a94094a6
...
...
@@ -122,7 +122,7 @@ describe 'Visual tokens', :js do
end
it
'changes value in visual token'
do
expect
(
first
(
'.tokens-container .filtered-search-token .value'
).
text
).
to
eq
(
'
n
one'
)
expect
(
first
(
'.tokens-container .filtered-search-token .value'
).
text
).
to
eq
(
'
N
one'
)
end
it
'moves input to the right'
do
...
...
@@ -147,7 +147,7 @@ describe 'Visual tokens', :js do
it
'selects static option from dropdown'
do
find
(
"#js-dropdown-milestone"
).
find
(
'.filter-dropdown-item'
,
text:
'Upcoming'
).
click
expect
(
first
(
'.tokens-container .filtered-search-token .value'
).
text
).
to
eq
(
'
u
pcoming'
)
expect
(
first
(
'.tokens-container .filtered-search-token .value'
).
text
).
to
eq
(
'
U
pcoming'
)
expect
(
is_input_focused
).
to
eq
(
true
)
end
...
...
@@ -348,7 +348,7 @@ describe 'Visual tokens', :js do
it
'tokenizes the search term to complete visual token'
do
expect_tokens
([
author_token
(
user
.
name
),
assignee_token
(
'
n
one'
)
assignee_token
(
'
N
one'
)
])
end
end
...
...
spec/models/application_record_spec.rb
0 → 100644
View file @
a94094a6
# frozen_string_literal: true
require
'spec_helper'
describe
ApplicationRecord
do
describe
'#id_in'
do
let
(
:records
)
{
create_list
(
:user
,
3
)
}
it
'returns records of the ids'
do
expect
(
User
.
id_in
(
records
.
last
(
2
).
map
(
&
:id
))).
to
eq
(
records
.
last
(
2
))
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment