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
a2ef287d
Commit
a2ef287d
authored
Jul 12, 2021
by
Scott Stern
Committed by
Olena Horal-Koretska
Jul 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user to top of filtered search in epics
parent
b587e0d5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
ee/app/assets/javascripts/boards/components/epic_filtered_search.vue
...ts/javascripts/boards/components/epic_filtered_search.vue
+15
-0
ee/spec/frontend/boards/components/epic_filtered_search_spec.js
...c/frontend/boards/components/epic_filtered_search_spec.js
+10
-0
No files found.
ee/app/assets/javascripts/boards/components/epic_filtered_search.vue
View file @
a2ef287d
<
script
>
<
script
>
import
BoardFilteredSearch
from
'
~/boards/components/board_filtered_search.vue
'
;
import
BoardFilteredSearch
from
'
~/boards/components/board_filtered_search.vue
'
;
import
{
TYPE_USER
}
from
'
~/graphql_shared/constants
'
;
import
{
convertToGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
AuthorToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/author_token.vue
'
;
import
AuthorToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/author_token.vue
'
;
import
LabelToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/label_token.vue
'
;
import
LabelToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/label_token.vue
'
;
...
@@ -46,6 +48,7 @@ export default {
...
@@ -46,6 +48,7 @@ export default {
token
:
AuthorToken
,
token
:
AuthorToken
,
unique
:
true
,
unique
:
true
,
fetchAuthors
:
this
.
fetchAuthors
,
fetchAuthors
:
this
.
fetchAuthors
,
preloadedAuthors
:
this
.
preloadedAuthors
(),
},
},
];
];
},
},
...
@@ -75,6 +78,18 @@ export default {
...
@@ -75,6 +78,18 @@ export default {
})
})
.
then
(({
data
})
=>
data
.
group
?.
labels
.
nodes
||
[]);
.
then
(({
data
})
=>
data
.
group
?.
labels
.
nodes
||
[]);
},
},
preloadedAuthors
()
{
return
gon
?.
current_user_id
?
[
{
id
:
convertToGraphQLId
(
TYPE_USER
,
gon
.
current_user_id
),
name
:
gon
.
current_user_fullname
,
username
:
gon
.
current_username
,
avatarUrl
:
gon
.
current_user_avatar_url
,
},
]
:
[];
},
},
},
};
};
</
script
>
</
script
>
...
...
ee/spec/frontend/boards/components/epic_filtered_search_spec.js
View file @
a2ef287d
...
@@ -16,6 +16,13 @@ describe('EpicFilteredSearch', () => {
...
@@ -16,6 +16,13 @@ describe('EpicFilteredSearch', () => {
});
});
};
};
window
.
gon
=
{
current_user_id
:
'
4
'
,
current_username
:
'
root
'
,
current_user_avatar_url
:
'
url
'
,
current_user_fullname
:
'
Admin
'
,
};
afterEach
(()
=>
{
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
.
destroy
();
});
});
...
@@ -56,6 +63,9 @@ describe('EpicFilteredSearch', () => {
...
@@ -56,6 +63,9 @@ describe('EpicFilteredSearch', () => {
token
:
AuthorToken
,
token
:
AuthorToken
,
unique
:
true
,
unique
:
true
,
fetchAuthors
:
wrapper
.
vm
.
fetchAuthors
,
fetchAuthors
:
wrapper
.
vm
.
fetchAuthors
,
preloadedAuthors
:
[
{
id
:
'
gid://gitlab/User/4
'
,
name
:
'
Admin
'
,
username
:
'
root
'
,
avatarUrl
:
'
url
'
},
],
},
},
];
];
expect
(
wrapper
.
find
(
BoardFilteredSearch
).
props
(
'
tokens
'
)).
toEqual
(
tokens
);
expect
(
wrapper
.
find
(
BoardFilteredSearch
).
props
(
'
tokens
'
)).
toEqual
(
tokens
);
...
...
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