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
ca0b1d49
Commit
ca0b1d49
authored
Oct 03, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove correct labels and weight when removing issue from board
parent
2d3b2b7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
app/assets/javascripts/boards/components/sidebar/remove_issue.js
...ets/javascripts/boards/components/sidebar/remove_issue.js
+11
-2
No files found.
app/assets/javascripts/boards/components/sidebar/remove_issue.js
View file @
ca0b1d49
...
@@ -30,12 +30,16 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
...
@@ -30,12 +30,16 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
},
},
methods
:
{
methods
:
{
removeIssue
()
{
removeIssue
()
{
const
board
=
Store
.
state
.
currentBoard
;
const
issue
=
this
.
issue
;
const
issue
=
this
.
issue
;
const
lists
=
issue
.
getLists
();
const
lists
=
issue
.
getLists
();
const
boardLabelIds
=
board
.
labels
.
map
(
label
=>
label
.
id
);
const
listLabelIds
=
lists
.
map
(
list
=>
list
.
label
.
id
);
const
listLabelIds
=
lists
.
map
(
list
=>
list
.
label
.
id
);
let
labelIds
=
this
.
issue
.
labels
let
labelIds
=
this
.
issue
.
labels
.
map
(
label
=>
label
.
id
)
.
map
(
label
=>
label
.
id
)
.
filter
(
id
=>
!
listLabelIds
.
includes
(
id
));
.
filter
(
id
=>
!
listLabelIds
.
includes
(
id
))
.
filter
(
id
=>
!
boardLabelIds
.
includes
(
id
));
if
(
labelIds
.
length
===
0
)
{
if
(
labelIds
.
length
===
0
)
{
labelIds
=
[
''
];
labelIds
=
[
''
];
}
}
...
@@ -44,10 +48,15 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
...
@@ -44,10 +48,15 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
label_ids
:
labelIds
,
label_ids
:
labelIds
,
},
},
};
};
if
(
Store
.
state
.
currentBoard
.
milestone_id
)
{
if
(
board
.
milestone_id
)
{
data
.
issue
.
milestone_id
=
-
1
;
data
.
issue
.
milestone_id
=
-
1
;
}
}
if
(
board
.
weight
)
{
data
.
issue
.
weight
=
null
;
}
// Post the remove data
// Post the remove data
Vue
.
http
.
patch
(
this
.
updateUrl
,
data
).
catch
(()
=>
{
Vue
.
http
.
patch
(
this
.
updateUrl
,
data
).
catch
(()
=>
{
new
Flash
(
'
Failed to remove issue from board, please try again.
'
,
'
alert
'
);
new
Flash
(
'
Failed to remove issue from board, please try again.
'
,
'
alert
'
);
...
...
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