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
0c76fe2e
Commit
0c76fe2e
authored
May 11, 2021
by
Eulyeon Ko
Committed by
Mayra Cabrera
May 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RUN-AS-IF-FOSS] Fix missing multiple_issue_assignees license check
parent
a7fe3cfc
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
88 additions
and
28 deletions
+88
-28
app/assets/javascripts/boards/components/board_content_sidebar.vue
...s/javascripts/boards/components/board_content_sidebar.vue
+4
-1
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+3
-0
app/assets/javascripts/sidebar/components/assignees/issuable_assignees.vue
...ripts/sidebar/components/assignees/issuable_assignees.vue
+1
-1
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue
...sidebar/components/assignees/sidebar_assignees_widget.vue
+1
-2
app/views/shared/boards/components/sidebar/_assignee.html.haml
...iews/shared/boards/components/sidebar/_assignee.html.haml
+1
-1
changelogs/unreleased/add-multiple-assignees-feature-check-boards.yml
...nreleased/add-multiple-assignees-feature-check-boards.yml
+5
-0
ee/app/helpers/ee/boards_helper.rb
ee/app/helpers/ee/boards_helper.rb
+1
-0
ee/spec/features/boards/sidebar_spec.rb
ee/spec/features/boards/sidebar_spec.rb
+27
-7
ee/spec/frontend/boards/components/__snapshots__/board_content_sidebar_spec.js.snap
...mponents/__snapshots__/board_content_sidebar_spec.js.snap
+0
-2
ee/spec/helpers/boards_helper_spec.rb
ee/spec/helpers/boards_helper_spec.rb
+33
-0
spec/features/boards/sidebar_assignee_spec.rb
spec/features/boards/sidebar_assignee_spec.rb
+11
-14
spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js
...bar/components/assignees/sidebar_assignees_widget_spec.js
+1
-0
No files found.
app/assets/javascripts/boards/components/board_content_sidebar.vue
View file @
0c76fe2e
...
...
@@ -32,6 +32,9 @@ export default {
import
(
'
ee_component/sidebar/components/sidebar_iteration_widget.vue
'
),
},
inject
:
{
multipleAssigneesFeatureAvailable
:
{
default
:
false
,
},
epicFeatureAvailable
:
{
default
:
false
,
},
...
...
@@ -83,7 +86,7 @@ export default {
:iid=
"activeBoardItem.iid"
:full-path=
"fullPath"
:initial-assignees=
"activeBoardItem.assignees"
class=
"assigne
e"
:allow-multiple-assignees=
"multipleAssigneesFeatureAvailabl
e"
@
assignees-updated=
"setAssignees"
/>
<board-sidebar-epic-select
v-if=
"epicFeatureAvailable"
class=
"epic"
/>
...
...
app/assets/javascripts/boards/index.js
View file @
0c76fe2e
...
...
@@ -101,6 +101,9 @@ export default () => {
labelsManagePath
:
$boardApp
.
dataset
.
labelsManagePath
,
labelsFilterBasePath
:
$boardApp
.
dataset
.
labelsFilterBasePath
,
timeTrackingLimitToHours
:
parseBoolean
(
$boardApp
.
dataset
.
timeTrackingLimitToHours
),
multipleAssigneesFeatureAvailable
:
parseBoolean
(
$boardApp
.
dataset
.
multipleAssigneesFeatureAvailable
,
),
epicFeatureAvailable
:
parseBoolean
(
$boardApp
.
dataset
.
epicFeatureAvailable
),
iterationFeatureAvailable
:
parseBoolean
(
$boardApp
.
dataset
.
iterationFeatureAvailable
),
weightFeatureAvailable
:
parseBoolean
(
$boardApp
.
dataset
.
weightFeatureAvailable
),
...
...
app/assets/javascripts/sidebar/components/assignees/issuable_assignees.vue
View file @
0c76fe2e
...
...
@@ -60,7 +60,7 @@ export default {
v-else
:users=
"users"
:issuable-type=
"issuableType"
class=
"gl-mt-2 hide-collapsed"
class=
"gl-
text-gray-800 gl-
mt-2 hide-collapsed"
/>
</div>
</template>
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue
View file @
0c76fe2e
...
...
@@ -71,8 +71,7 @@ export default {
},
allowMultipleAssignees
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
required
:
true
,
},
},
data
()
{
...
...
app/views/shared/boards/components/sidebar/_assignee.html.haml
View file @
0c76fe2e
...
...
@@ -6,5 +6,5 @@
%sidebar-assignees-widget
{
":iid"
=>
"String(issue.iid)"
,
":full-path"
=>
"issue.path.split('/-/')[0].substring(1).replace(`#{relative_url}`, '')"
,
":initial-assignees"
=>
"issue.assignees"
,
":multiple-assignees"
=>
"!Boolean(#{dropdown_options[:data][:"
max
-
select
"]})"
,
":
allow-
multiple-assignees"
=>
"!Boolean(#{dropdown_options[:data][:"
max
-
select
"]})"
,
"@assignees-updated"
=>
"setAssignees"
}
changelogs/unreleased/add-multiple-assignees-feature-check-boards.yml
0 → 100644
View file @
0c76fe2e
---
title
:
Fix multiple assignees checked in boards sidebar
merge_request
:
61227
author
:
type
:
fixed
ee/app/helpers/ee/boards_helper.rb
View file @
0c76fe2e
...
...
@@ -25,6 +25,7 @@ module EE
label_ids:
board
.
label_ids
,
labels:
board
.
labels
.
to_json
(
only:
[
:id
,
:title
,
:color
,
:text_color
]
),
board_weight:
board
.
weight
,
multiple_assignees_feature_available:
current_board_parent
.
feature_available?
(
:multiple_issue_assignees
).
to_s
,
weight_feature_available:
current_board_parent
.
feature_available?
(
:issue_weights
).
to_s
,
milestone_lists_available:
current_board_parent
.
feature_available?
(
:board_milestone_lists
).
to_s
,
assignee_lists_available:
current_board_parent
.
feature_available?
(
:board_assignee_lists
).
to_s
,
...
...
ee/spec/features/boards/sidebar_spec.rb
View file @
0c76fe2e
...
...
@@ -41,12 +41,12 @@ RSpec.describe 'Issue Boards', :js do
end
context
'assignee'
do
let
(
:assignee_widget
)
{
'[data-testid="issue-boards-sidebar"] [data-testid="assignees-widget"]'
}
let
(
:assignee
s
_widget
)
{
'[data-testid="issue-boards-sidebar"] [data-testid="assignees-widget"]'
}
it
'updates the issues assignee'
do
click_card
(
card2
)
page
.
within
(
assignee_widget
)
do
page
.
within
(
assignee
s
_widget
)
do
click_button
(
'Edit'
)
wait_for_requests
...
...
@@ -68,7 +68,7 @@ RSpec.describe 'Issue Boards', :js do
it
'adds multiple assignees'
do
click_card
(
card1
)
page
.
within
(
assignee_widget
)
do
page
.
within
(
assignee
s
_widget
)
do
click_button
(
'Edit'
)
wait_for_requests
...
...
@@ -96,7 +96,7 @@ RSpec.describe 'Issue Boards', :js do
it
'removes the assignee'
do
click_card
(
card1
)
page
.
within
(
assignee_widget
)
do
page
.
within
(
assignee
s
_widget
)
do
click_button
(
'Edit'
)
wait_for_requests
...
...
@@ -116,7 +116,7 @@ RSpec.describe 'Issue Boards', :js do
it
'assignees to current user'
do
click_card
(
card2
)
page
.
within
(
assignee_widget
)
do
page
.
within
(
assignee
s
_widget
)
do
expect
(
page
).
to
have_content
(
'None'
)
click_button
'assign yourself'
...
...
@@ -132,7 +132,7 @@ RSpec.describe 'Issue Boards', :js do
it
'updates assignee dropdown'
do
click_card
(
card2
)
page
.
within
(
assignee_widget
)
do
page
.
within
(
assignee
s
_widget
)
do
click_button
(
'Edit'
)
wait_for_requests
...
...
@@ -150,12 +150,32 @@ RSpec.describe 'Issue Boards', :js do
click_card
(
card1
)
page
.
within
(
assignee_widget
)
do
page
.
within
(
assignee
s
_widget
)
do
click_button
(
'Edit'
)
expect
(
find
(
'.dropdown-menu'
)).
to
have_selector
(
'.gl-new-dropdown-item-check-icon'
)
end
end
context
'when multiple assignees feature is not available'
do
before
do
stub_licensed_features
(
multiple_issue_assignees:
false
)
visit_project_board
end
it
'does not allow selecting multiple assignees'
do
click_card
(
card1
)
page
.
within
(
assignees_widget
)
do
click_button
(
'Edit'
)
first
(
'.dropdown-menu-user .gl-avatar-labeled'
).
click
expect
(
page
).
to
have_selector
(
'.dropdown-menu'
,
visible:
false
)
end
end
end
end
context
'epic'
do
...
...
ee/spec/frontend/boards/components/__snapshots__/board_content_sidebar_spec.js.snap
View file @
0c76fe2e
...
...
@@ -6,8 +6,6 @@ exports[`ee/BoardContentSidebar matches the snapshot 1`] = `
<board-sidebar-title-stub />
<sidebar-assignees-widget-stub
allowmultipleassignees="true"
class="assignee"
fullpath="gitlab-org/gitlab-test"
iid="27"
initialassignees="[object Object],[object Object]"
...
...
ee/spec/helpers/boards_helper_spec.rb
View file @
0c76fe2e
...
...
@@ -63,6 +63,28 @@ RSpec.describe BoardsHelper do
allow
(
helper
).
to
receive
(
:can?
).
with
(
user
,
:admin_issue_board_list
,
project
).
and_return
(
false
)
end
shared_examples
'serializes the availability of a licensed feature'
do
|
feature_name
,
feature_key
|
context
"when '
#{
feature_name
}
' is available"
do
before
do
stub_licensed_features
({
feature_name
=>
true
})
end
it
"indicates that the feature is available in a boolean string"
do
expect
(
board_data
[
feature_key
]).
to
eq
(
"true"
)
end
end
context
"when '
#{
feature_name
}
' is unavailable"
do
before
do
stub_licensed_features
({
feature_name
=>
false
})
end
it
"indicates that the feature is unavailable in a boolean string"
do
expect
(
board_data
[
feature_key
]).
to
eq
(
"false"
)
end
end
end
context
'when no iteration'
,
:aggregate_failures
do
it
'serializes board without iteration'
do
expect
(
board_data
[
:board_iteration_title
]).
to
be_nil
...
...
@@ -82,6 +104,17 @@ RSpec.describe BoardsHelper do
expect
(
board_data
[
:board_iteration_id
]).
to
eq
(
iteration
.
id
)
end
end
[[
:multiple_issue_assignees
,
:multiple_assignees_feature_available
],
[
:issue_weights
,
:weight_feature_available
],
[
:board_milestone_lists
,
:milestone_lists_available
],
[
:board_assignee_lists
,
:assignee_lists_available
],
[
:board_iteration_lists
,
:iteration_lists_available
],
[
:epics
,
:epic_feature_available
],
[
:iterations
,
:iteration_feature_available
],
[
:scoped_labels
,
:scoped_labels
]].
each
do
|
feature_name
,
feature_key
|
include_examples
"serializes the availability of a licensed feature"
,
feature_name
,
feature_key
end
end
context
'epic board'
do
...
...
spec/features/boards/sidebar_assignee_spec.rb
View file @
0c76fe2e
...
...
@@ -18,6 +18,8 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
let
(
:card
)
{
find
(
'.board:nth-child(2)'
).
first
(
'.board-card'
)
}
before
do
stub_licensed_features
(
multiple_issue_assignees:
false
)
project
.
add_maintainer
(
user
)
sign_in
(
user
)
...
...
@@ -27,10 +29,12 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
end
context
'assignee'
do
let
(
:assignees_widget
)
{
'[data-testid="issue-boards-sidebar"] [data-testid="assignees-widget"]'
}
it
'updates the issues assignee'
do
click_card
(
card
)
page
.
within
(
'.assignee'
)
do
page
.
within
(
assignees_widget
)
do
click_button
(
'Edit'
)
wait_for_requests
...
...
@@ -41,12 +45,11 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
first
(
'.gl-avatar-labeled'
).
click
end
click_button
(
'Apply'
)
wait_for_requests
expect
(
page
).
to
have_content
(
assignee
)
end
wait_for_requests
expect
(
card
).
to
have_selector
(
'.avatar'
)
end
...
...
@@ -54,7 +57,7 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
card_two
=
find
(
'.board:nth-child(2)'
).
find
(
'.board-card:nth-child(2)'
)
click_card
(
card_two
)
page
.
within
(
'.assignee'
)
do
page
.
within
(
assignees_widget
)
do
click_button
(
'Edit'
)
wait_for_requests
...
...
@@ -63,9 +66,6 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
find
(
'[data-testid="unassign"]'
).
click
end
click_button
(
'Apply'
)
wait_for_requests
expect
(
page
).
to
have_content
(
'None'
)
end
...
...
@@ -75,7 +75,7 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
it
'assignees to current user'
do
click_card
(
card
)
page
.
within
(
find
(
'.assignee'
)
)
do
page
.
within
(
assignees_widget
)
do
expect
(
page
).
to
have_content
(
'None'
)
click_button
'assign yourself'
...
...
@@ -91,7 +91,7 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
it
'updates assignee dropdown'
do
click_card
(
card
)
page
.
within
(
'.assignee'
)
do
page
.
within
(
assignees_widget
)
do
click_button
(
'Edit'
)
wait_for_requests
...
...
@@ -102,9 +102,6 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
first
(
'.gl-avatar-labeled'
).
click
end
click_button
(
'Apply'
)
wait_for_requests
expect
(
page
).
to
have_content
(
assignee
)
end
...
...
@@ -112,7 +109,7 @@ RSpec.describe 'Project issue boards sidebar assignee', :js do
find
(
'.board-card:nth-child(2)'
).
click
end
page
.
within
(
'.assignee'
)
do
page
.
within
(
assignees_widget
)
do
click_button
(
'Edit'
)
expect
(
find
(
'.dropdown-menu'
)).
to
have_selector
(
'.gl-new-dropdown-item-check-icon'
)
...
...
spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js
View file @
0c76fe2e
...
...
@@ -65,6 +65,7 @@ describe('Sidebar assignees widget', () => {
iid
:
'
1
'
,
issuableId
:
0
,
fullPath
:
'
/mygroup/myProject
'
,
allowMultipleAssignees
:
true
,
...
props
,
},
provide
:
{
...
...
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