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
a878a2b1
Commit
a878a2b1
authored
Mar 17, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes issue milestone when removing from board with milestone
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/29613
parent
ec4788d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
3 deletions
+35
-3
app/assets/javascripts/boards/components/sidebar/remove_issue.js
...ets/javascripts/boards/components/sidebar/remove_issue.js
+8
-3
spec/features/boards/board_with_milestone_spec.rb
spec/features/boards/board_with_milestone_spec.rb
+27
-0
No files found.
app/assets/javascripts/boards/components/sidebar/remove_issue.js
View file @
a878a2b1
...
...
@@ -23,11 +23,16 @@
const
issue
=
this
.
issue
;
const
lists
=
issue
.
getLists
();
const
labelIds
=
lists
.
map
(
list
=>
list
.
label
.
id
);
const
data
=
{
remove_label_ids
:
labelIds
,
};
if
(
Store
.
state
.
currentBoard
.
milestone_id
)
{
data
.
milestone_id
=
-
1
;
}
// Post the remove data
gl
.
boardService
.
bulkUpdate
([
issue
.
globalId
],
{
remove_label_ids
:
labelIds
,
}).
catch
(()
=>
{
gl
.
boardService
.
bulkUpdate
([
issue
.
globalId
],
data
).
catch
(()
=>
{
new
Flash
(
'
Failed to remove issue from board, please try again.
'
,
'
alert
'
);
lists
.
forEach
((
list
)
=>
{
...
...
spec/features/boards/board_with_milestone_spec.rb
View file @
a878a2b1
...
...
@@ -85,6 +85,33 @@ describe 'Board with milestone', :feature, :js do
end
end
context
'removing issue from board'
do
let
(
:label
)
{
create
(
:label
,
project:
project
)
}
let!
(
:issue
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
label
],
milestone:
milestone
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
,
milestone:
milestone
)
}
let!
(
:list
)
{
create
(
:list
,
board:
board
,
label:
label
,
position:
0
)
}
before
do
visit
namespace_project_boards_path
(
project
.
namespace
,
project
)
end
it
'removes issues milestone when removing from the board'
do
wait_for_vue_resource
first
(
'.card'
).
click
click_button
(
'Remove from board'
)
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
expect
(
page
).
to
have_content
(
'removed milestone'
)
page
.
within
(
'.milestone.block'
)
do
expect
(
page
).
to
have_content
(
'None'
)
end
end
end
def
create_board_with_milestone
page
.
within
'#js-multiple-boards-switcher'
do
find
(
'.dropdown-menu-toggle'
).
click
...
...
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