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
d5536cfa
Commit
d5536cfa
authored
Aug 25, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix - Some users cannot move issues in epic swimlanes
Changelog: fixed EE: true
parent
d81233e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
10 deletions
+53
-10
ee/app/assets/javascripts/boards/components/issues_lane_list.vue
...assets/javascripts/boards/components/issues_lane_list.vue
+3
-1
ee/spec/features/boards/swimlanes/epics_swimlanes_drag_drop_spec.rb
...atures/boards/swimlanes/epics_swimlanes_drag_drop_spec.rb
+20
-7
ee/spec/frontend/boards/components/issues_lane_list_spec.js
ee/spec/frontend/boards/components/issues_lane_list_spec.js
+25
-1
ee/spec/frontend/boards/stores/actions_spec.js
ee/spec/frontend/boards/stores/actions_spec.js
+5
-1
No files found.
ee/app/assets/javascripts/boards/components/issues_lane_list.vue
View file @
d5536cfa
...
...
@@ -51,7 +51,9 @@ export default {
computed
:
{
...
mapState
([
'
activeId
'
,
'
filterParams
'
,
'
canAdminEpic
'
,
'
listsFlags
'
,
'
highlightedLists
'
]),
treeRootWrapper
()
{
return
this
.
canAdminList
&&
this
.
canAdminEpic
?
Draggable
:
'
ul
'
;
return
this
.
canAdminList
&&
(
this
.
canAdminEpic
||
this
.
isUnassignedIssuesLane
)
?
Draggable
:
'
ul
'
;
},
treeRootOptions
()
{
const
options
=
{
...
...
ee/spec/features/boards/swimlanes/epics_swimlanes_drag_drop_spec.rb
View file @
d5536cfa
...
...
@@ -16,17 +16,10 @@ RSpec.describe 'epics swimlanes', :js do
let_it_be
(
:list
)
{
create
(
:list
,
board:
board
,
label:
label
,
position:
0
)
}
let_it_be
(
:issue1
)
{
create
(
:issue
,
project:
project
,
labels:
[
label
])
}
let_it_be
(
:issue2
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:issue3
)
{
create
(
:issue
,
project:
project
,
state: :closed
)
}
let_it_be
(
:issue4
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:epic1
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:epic2
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:epic_issue1
)
{
create
(
:epic_issue
,
epic:
epic1
,
issue:
issue1
)
}
let_it_be
(
:epic_issue2
)
{
create
(
:epic_issue
,
epic:
epic2
,
issue:
issue2
)
}
let_it_be
(
:epic_issue3
)
{
create
(
:epic_issue
,
epic:
epic2
,
issue:
issue3
)
}
before
do
project
.
add_maintainer
(
user
)
group
.
add_maintainer
(
user
)
...
...
@@ -38,7 +31,27 @@ RSpec.describe 'epics swimlanes', :js do
load_unassigned_issues
end
context
'when no epic is displayed'
do
it
(
'user can drag and drop between columns'
)
do
wait_for_board_cards_in_unassigned_lane
(
1
,
1
)
epic_lanes
=
page
.
all
(
:css
,
'.board-epic-lane'
)
expect
(
epic_lanes
.
length
).
to
eq
(
0
)
drag
(
list_from_index:
1
,
list_to_index:
0
)
wait_for_board_cards_in_unassigned_lane
(
0
,
1
)
end
end
context
'drag and drop issue'
do
let_it_be
(
:issue2
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:issue3
)
{
create
(
:issue
,
project:
project
,
state: :closed
)
}
let_it_be
(
:issue4
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:epic_issue1
)
{
create
(
:epic_issue
,
epic:
epic1
,
issue:
issue1
)
}
let_it_be
(
:epic_issue2
)
{
create
(
:epic_issue
,
epic:
epic2
,
issue:
issue2
)
}
let_it_be
(
:epic_issue3
)
{
create
(
:epic_issue
,
epic:
epic2
,
issue:
issue3
)
}
it
'between epics'
do
wait_for_board_cards
(
1
,
2
)
wait_for_board_cards_in_first_epic
(
0
,
1
)
...
...
ee/spec/frontend/boards/components/issues_lane_list_spec.js
View file @
d5536cfa
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
nextTick
}
from
'
vue
'
;
import
Draggable
from
'
vuedraggable
'
;
import
IssuesLaneList
from
'
ee/boards/components/issues_lane_list.vue
'
;
import
{
mockList
}
from
'
jest/boards/mock_data
'
;
import
BoardCard
from
'
~/boards/components/board_card.vue
'
;
...
...
@@ -11,7 +12,11 @@ describe('IssuesLaneList', () => {
let
wrapper
;
let
store
;
const
createComponent
=
({
listType
=
ListType
.
backlog
,
collapsed
=
false
}
=
{})
=>
{
const
createComponent
=
({
listType
=
ListType
.
backlog
,
collapsed
=
false
,
isUnassignedIssuesLane
=
false
,
}
=
{})
=>
{
const
listMock
=
{
...
mockList
,
listType
,
...
...
@@ -30,6 +35,7 @@ describe('IssuesLaneList', () => {
issues
:
mockIssues
,
disabled
:
false
,
canAdminList
:
true
,
isUnassignedIssuesLane
,
},
});
};
...
...
@@ -71,6 +77,24 @@ describe('IssuesLaneList', () => {
});
});
describe
(
'
drag & drop permissions
'
,
()
=>
{
beforeEach
(()
=>
{
store
=
createStore
();
createComponent
();
});
it
(
'
user cannot drag on epic lane if canAdminEpic is false
'
,
()
=>
{
expect
(
wrapper
.
vm
.
treeRootWrapper
).
toBe
(
'
ul
'
);
});
it
(
'
user can drag on unassigned lane if canAdminEpic is false
'
,
()
=>
{
createComponent
({
isUnassignedIssuesLane
:
true
});
expect
(
wrapper
.
vm
.
treeRootWrapper
).
toBe
(
Draggable
);
});
});
describe
(
'
drag & drop issue
'
,
()
=>
{
beforeEach
(()
=>
{
const
defaultStore
=
createStore
();
...
...
ee/spec/frontend/boards/stores/actions_spec.js
View file @
d5536cfa
...
...
@@ -282,7 +282,11 @@ describe('fetchEpicsSwimlanes', () => {
[
{
type
:
types
.
RECEIVE_EPICS_SUCCESS
,
payload
:
{
epics
:
[
mockEpic
],
hasMoreEpics
:
true
,
epicsEndCursor
:
'
ENDCURSOR
'
},
payload
:
{
epics
:
[
mockEpic
],
hasMoreEpics
:
true
,
epicsEndCursor
:
'
ENDCURSOR
'
,
},
},
],
[],
...
...
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