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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
a080aa13
Commit
a080aa13
authored
Jul 03, 2017
by
Luke "Jared" Bennett
Committed by
Phil Hughes
Jul 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Issue Board -> "Remove from board" button when viewing an issue gives js error and fails"
parent
b071317c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
4 deletions
+27
-4
app/assets/javascripts/boards/components/board_sidebar.js
app/assets/javascripts/boards/components/board_sidebar.js
+4
-1
app/assets/javascripts/boards/components/sidebar/remove_issue.js
...ets/javascripts/boards/components/sidebar/remove_issue.js
+1
-2
app/views/projects/boards/components/_sidebar.html.haml
app/views/projects/boards/components/_sidebar.html.haml
+2
-1
changelogs/unreleased/34097-issue-board-remove-from-board-button-when-viewing-an-issue-gives-js-error-and-fails.yml
...button-when-viewing-an-issue-gives-js-error-and-fails.yml
+4
-0
spec/features/boards/sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+16
-0
No files found.
app/assets/javascripts/boards/components/board_sidebar.js
View file @
a080aa13
...
@@ -34,7 +34,10 @@ gl.issueBoards.BoardSidebar = Vue.extend({
...
@@ -34,7 +34,10 @@ gl.issueBoards.BoardSidebar = Vue.extend({
},
},
milestoneTitle
()
{
milestoneTitle
()
{
return
this
.
issue
.
milestone
?
this
.
issue
.
milestone
.
title
:
'
No Milestone
'
;
return
this
.
issue
.
milestone
?
this
.
issue
.
milestone
.
title
:
'
No Milestone
'
;
}
},
canRemove
()
{
return
!
this
.
list
.
preset
;
},
},
},
watch
:
{
watch
:
{
detail
:
{
detail
:
{
...
...
app/assets/javascripts/boards/components/sidebar/remove_issue.js
View file @
a080aa13
...
@@ -46,8 +46,7 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
...
@@ -46,8 +46,7 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
},
},
template
:
`
template
:
`
<div
<div
class="block list"
class="block list">
v-if="list.type !== 'closed'">
<button
<button
class="btn btn-default btn-block"
class="btn btn-default btn-block"
type="button"
type="button"
...
...
app/views/projects/boards/components/_sidebar.html.haml
View file @
a080aa13
...
@@ -23,4 +23,5 @@
...
@@ -23,4 +23,5 @@
=
render
"projects/boards/components/sidebar/labels"
=
render
"projects/boards/components/sidebar/labels"
=
render
"projects/boards/components/sidebar/notifications"
=
render
"projects/boards/components/sidebar/notifications"
%remove-btn
{
":issue"
=>
"issue"
,
%remove-btn
{
":issue"
=>
"issue"
,
":list"
=>
"list"
}
":list"
=>
"list"
,
"v-if"
=>
"canRemove"
}
changelogs/unreleased/34097-issue-board-remove-from-board-button-when-viewing-an-issue-gives-js-error-and-fails.yml
0 → 100644
View file @
a080aa13
---
title
:
Remove "Remove from board" button from backlog and closed list
merge_request
:
12430
author
:
spec/features/boards/sidebar_spec.rb
View file @
a080aa13
...
@@ -79,6 +79,22 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -79,6 +79,22 @@ describe 'Issue Boards', feature: true, js: true do
end
end
end
end
it
'does not show remove button for backlog or closed issues'
do
create
(
:issue
,
project:
project
)
create
(
:issue
,
:closed
,
project:
project
)
visit
namespace_project_board_path
(
project
.
namespace
,
project
,
board
)
wait_for_requests
click_card
(
find
(
'.board:nth-child(1)'
).
first
(
'.card'
))
expect
(
find
(
'.issue-boards-sidebar'
)).
not_to
have_button
'Remove from board'
click_card
(
find
(
'.board:nth-child(3)'
).
first
(
'.card'
))
expect
(
find
(
'.issue-boards-sidebar'
)).
not_to
have_button
'Remove from board'
end
context
'assignee'
do
context
'assignee'
do
it
'updates the issues assignee'
do
it
'updates the issues assignee'
do
click_card
(
card
)
click_card
(
card
)
...
...
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