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
e7b3a118
Commit
e7b3a118
authored
Sep 03, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix creating issue in milestone list
Changelog: fixed EE: true
parent
b0e75d46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
6 deletions
+41
-6
app/assets/javascripts/boards/boards_util.js
app/assets/javascripts/boards/boards_util.js
+2
-1
ee/spec/features/boards/new_issue_spec.rb
ee/spec/features/boards/new_issue_spec.rb
+39
-5
No files found.
app/assets/javascripts/boards/boards_util.js
View file @
e7b3a118
...
...
@@ -108,7 +108,8 @@ export function formatIssueInput(issueInput, boardConfig) {
return
{
...
issueInput
,
milestoneId
:
milestoneId
?
fullMilestoneId
(
milestoneId
)
:
null
,
milestoneId
:
milestoneId
&&
milestoneId
!==
-
1
?
fullMilestoneId
(
milestoneId
)
:
issueInput
.
milestoneId
,
labelIds
:
[...
labelIds
,
...(
labels
?.
map
((
l
)
=>
fullLabelId
(
l
))
||
[])],
assigneeIds
:
[...
assigneeIds
,
...(
assigneeId
?
[
fullUserId
(
assigneeId
)]
:
[])],
};
...
...
ee/spec/features/boards/new_issue_spec.rb
View file @
e7b3a118
...
...
@@ -3,10 +3,17 @@
require
'spec_helper'
RSpec
.
describe
'Issue Boards new issue'
,
:js
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:board
)
{
create
(
:board
,
project:
project
)
}
let_it_be
(
:backlog_list
)
{
create
(
:backlog_list
,
board:
board
)
}
before
do
stub_licensed_features
(
board_milestone_lists:
true
)
end
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:milestone
)
{
create
(
:milestone
,
project:
project
,
title:
'Milestone 1'
)
}
let_it_be
(
:board
)
{
create
(
:board
,
project:
project
)
}
let_it_be
(
:backlog_list
)
{
create
(
:backlog_list
,
board:
board
)
}
let!
(
:milestone_list
)
{
create
(
:milestone_list
,
board:
board
,
milestone:
milestone
,
position:
0
)
}
context
'authorized user'
do
before
do
...
...
@@ -17,7 +24,7 @@ RSpec.describe 'Issue Boards new issue', :js do
visit
project_board_path
(
project
,
board
)
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
end
it
'successfully assigns weight to newly-created issue'
do
...
...
@@ -48,5 +55,32 @@ RSpec.describe 'Issue Boards new issue', :js do
expect
(
find
(
'.board-card-weight .board-card-info-text'
).
text
).
to
eq
(
"10"
)
end
end
describe
'milestone list'
do
it
'successfuly loads milestone to be added to newly created issue'
do
page
.
within
(
all
(
'.board'
)[
1
])
do
click_button
'New issue'
end
page
.
within
(
first
(
'.board-new-issue-form'
))
do
find
(
'.form-control'
).
set
(
'new issue'
)
click_button
'Create issue'
end
wait_for_requests
page
.
within
(
all
(
'.board'
)[
1
])
do
find
(
'.board-card'
).
click
end
page
.
within
(
'[data-testid="sidebar-milestones"]'
)
do
click_button
'Edit'
wait_for_requests
expect
(
page
).
to
have_content
'Milestone 1'
end
end
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