BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
63a1ec14
Commit
63a1ec14
authored
Jul 25, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly removes from boards when moved to done
Only shows options to remove from all boards if issue is in more than 1
parent
ff7bab37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
issue_done.js.coffee
...assets/javascripts/boards/components/issue_done.js.coffee
+7
-0
boards_store.js.coffee
app/assets/javascripts/boards/stores/boards_store.js.coffee
+13
-3
_board.html.haml
app/views/projects/boards/components/_board.html.haml
+2
-2
No files found.
app/assets/javascripts/boards/components/issue_done.js.coffee
View file @
63a1ec14
IssueDone
=
Vue
.
extend
props
:
done
:
Object
methods
:
removeFromAll
:
->
BoardsStore
.
removeIssueFromBoards
(
this
.
done
.
issue
,
this
.
done
.
boards
)
BoardsStore
.
clearDone
()
removeFromSingle
:
->
BoardsStore
.
removeIssueFromBoard
(
this
.
done
.
issue
,
this
.
done
.
board
)
BoardsStore
.
clearDone
()
Vue
.
component
(
'issue-done'
,
IssueDone
)
app/assets/javascripts/boards/stores/boards_store.js.coffee
View file @
63a1ec14
...
...
@@ -36,7 +36,7 @@
# Add to new boards issues
boardTo
.
issues
.
splice
(
toIndex
,
0
,
issue
)
if
boardTo
.
id
is
'done'
if
boardTo
.
id
is
'done'
and
issueBoards
.
length
>
1
Vue
.
set
(
BoardsStore
.
state
.
done
,
'board'
,
boardFrom
)
Vue
.
set
(
BoardsStore
.
state
.
done
,
'issue'
,
issue
)
Vue
.
set
(
BoardsStore
.
state
.
done
,
'boards'
,
issueBoards
)
...
...
@@ -45,13 +45,23 @@
label
.
title
is
boardFrom
.
title
else
if
boardTo
.
label
?
foundLabel
=
_
.
find
issue
.
labels
,
(
label
)
->
label
.
title
is
boardTo
.
label
.
title
BoardsStore
.
removeIssueFromBoard
(
issue
,
boardTo
)
unless
foundLabel
?
issue
.
labels
.
push
(
boardTo
.
label
)
removeIssueFromBoards
:
(
issue
,
boards
)
->
boardLabels
=
_
.
map
boards
,
(
board
)
->
board
.
label
.
title
issue
.
labels
=
_
.
reject
issue
.
labels
,
(
label
)
->
boardLabels
.
indexOf
(
label
.
title
)
!=
-
1
removeIssueFromBoard
:
(
issue
,
board
)
->
issue
.
labels
=
_
.
reject
issue
.
labels
,
(
label
)
->
label
.
title
is
board
.
title
getBoardsForIssue
:
(
issue
)
->
_
.
filter
BoardsStore
.
state
.
boards
,
(
board
)
->
foundIssue
=
_
.
find
board
.
issues
,
(
boardIssue
)
->
issue
?
.
id
==
boardIssue
?
.
id
foundIssue
?
clearDone
:
->
Vue
.
set
(
BoardsStore
.
state
,
'done'
,
{})
app/views/projects/boards/components/_board.html.haml
View file @
63a1ec14
...
...
@@ -31,7 +31,7 @@
{{ board.title }}
%p
Moving it to Done will remove it from all lists and close the issue.
%button
.btn.btn-gray.btn-block.prepend-top-10
{
type:
"button"
}
%button
.btn.btn-gray.btn-block.prepend-top-10
{
type:
"button"
,
"@click"
=>
"removeFromAll"
}
Remove from all lists and close
%button
.btn.btn-gray.btn-block
{
type:
"button"
}
%button
.btn.btn-gray.btn-block
{
type:
"button"
,
"@click"
=>
"removeFromSingle"
}
Remove from {{ done.board.title }} list
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