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
2b719022
Commit
2b719022
authored
Sep 30, 2020
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Include assigned users in /reassign autocomplete"
This reverts commit
6e1cca98
.
parent
5d673390
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
app/assets/javascripts/gfm_auto_complete.js
app/assets/javascripts/gfm_auto_complete.js
+1
-3
app/assets/javascripts/vue_shared/components/gl_mentions.vue
app/assets/javascripts/vue_shared/components/gl_mentions.vue
+7
-4
ee/spec/features/issues/gfm_autocomplete_ee_spec.rb
ee/spec/features/issues/gfm_autocomplete_ee_spec.rb
+4
-4
No files found.
app/assets/javascripts/gfm_auto_complete.js
View file @
2b719022
...
...
@@ -278,13 +278,11 @@ class GfmAutoComplete {
return
$
.
fn
.
atwho
.
default
.
callbacks
.
filter
(
query
,
data
,
searchKey
);
}
if
(
command
===
MEMBER_COMMAND
.
ASSIGN
)
{
if
(
command
===
MEMBER_COMMAND
.
ASSIGN
||
command
===
MEMBER_COMMAND
.
REASSIGN
)
{
// Only include members which are not assigned to Issuable currently
return
data
.
filter
(
member
=>
member
.
type
===
'
User
'
&&
!
assignees
.
includes
(
member
.
search
),
);
}
else
if
(
command
===
MEMBER_COMMAND
.
REASSIGN
)
{
return
data
.
filter
(
member
=>
member
.
type
===
'
User
'
);
}
else
if
(
command
===
MEMBER_COMMAND
.
UNASSIGN
)
{
// Only include members which are assigned to Issuable currently
return
data
.
filter
(
member
=>
assignees
.
includes
(
member
.
search
));
...
...
app/assets/javascripts/vue_shared/components/gl_mentions.vue
View file @
2b719022
...
...
@@ -65,13 +65,16 @@ const autoCompleteMap = {
SidebarMediator
.
singleton
?.
store
?.
assignees
?.
map
(
assignee
=>
assignee
.
username
)
||
[];
}
if
(
doesCurrentLineStartWith
(
'
/assign
'
,
fullText
,
selectionStart
))
{
if
(
doesCurrentLineStartWith
(
'
/assign
'
,
fullText
,
selectionStart
)
||
doesCurrentLineStartWith
(
'
/reassign
'
,
fullText
,
selectionStart
)
)
{
return
this
.
members
.
filter
(
member
=>
member
.
type
===
'
User
'
&&
!
this
.
assignees
.
includes
(
member
.
username
),
);
}
else
if
(
doesCurrentLineStartWith
(
'
/reassign
'
,
fullText
,
selectionStart
))
{
return
this
.
members
.
filter
(
member
=>
member
.
type
===
'
User
'
);
}
else
if
(
doesCurrentLineStartWith
(
'
/unassign
'
,
fullText
,
selectionStart
))
{
}
if
(
doesCurrentLineStartWith
(
'
/unassign
'
,
fullText
,
selectionStart
))
{
return
this
.
members
.
filter
(
member
=>
this
.
assignees
.
includes
(
member
.
username
));
}
...
...
ee/spec/features/issues/gfm_autocomplete_ee_spec.rb
View file @
2b719022
...
...
@@ -30,7 +30,7 @@ RSpec.describe 'GFM autocomplete EE', :js do
wait_for_requests
end
it
'
excludes groups
when using /reassign'
do
it
'
lists users who are currently not assigned to the issue
when using /reassign'
do
note
=
find
(
'#note-body'
)
page
.
within
'.timeline-content-form'
do
note
.
native
.
send_keys
(
'/reas'
)
...
...
@@ -41,8 +41,8 @@ RSpec.describe 'GFM autocomplete EE', :js do
wait_for_requests
expect
(
find
(
'#at-view-users .atwho-view-ul'
)).
not_to
have_content
(
user
.
username
)
expect
(
find
(
'#at-view-users .atwho-view-ul'
)).
not_to
have_content
(
group
.
name
)
expect
(
find
(
'#at-view-users .atwho-view-ul'
)).
to
have_content
(
user
.
username
)
expect
(
find
(
'#at-view-users .atwho-view-ul'
)).
to
have_content
(
another_user
.
username
)
end
...
...
@@ -73,7 +73,7 @@ RSpec.describe 'GFM autocomplete EE', :js do
wait_for_requests
end
it
'
excludes groups
when using /reassign'
do
it
'
lists users who are currently not assigned to the issue
when using /reassign'
do
note
=
find
(
'#note-body'
)
page
.
within
'.timeline-content-form'
do
note
.
native
.
send_keys
(
'/reas'
)
...
...
@@ -85,8 +85,8 @@ RSpec.describe 'GFM autocomplete EE', :js do
wait_for_requests
expect
(
find
(
'.tribute-container ul'
,
visible:
true
)).
not_to
have_content
(
user
.
username
)
expect
(
find
(
'.tribute-container ul'
,
visible:
true
)).
not_to
have_content
(
group
.
name
)
expect
(
find
(
'.tribute-container ul'
,
visible:
true
)).
to
have_content
(
user
.
username
)
expect
(
find
(
'.tribute-container ul'
,
visible:
true
)).
to
have_content
(
another_user
.
username
)
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